企业网三层架构

企业网三层架构搭建

企业网三层架构

企业网三层架构

先划分IP

R1与SW1:172.16.0.0/30

R2与SW2:172.16.0.4/30

vlan 2:172.16.1.0/25

vlan 3:172.16.1.128/25

R2

interface Loopback0 配置IP

ip address 1.1.1.1 255.255.255.0

interface FastEthernet0/0

ip address 12.1.1.1 255.255.255.0

R1

interface FastEthernet0/0 配置IP

ip address 12.1.1.2 255.255.255.0

interface FastEthernet0/1

ip address 172.16.0.1 255.255.255.252

interface FastEthernet1/0

ip address 172.16.0.5 255.255.255.252

router eigrp 100 eigrp协议

redistribute static 重发布;就是下放缺省

network 172.16.0.0

auto-summary

interface f0/0 外网接口

ip nat outside

interface f0/1 内网接口

ip nat inside

interface f1/0

ip nat inside

ip route 0.0.0.0 0.0.0.0 12.1.1.1 静态路由指向外网

access-list 1 permit 172.16.0.0 0.0.255.255 抓取内网流量

ip nat inside source list 1 interface FastEthernet0/0 overload 把内网流量转化为从f0/0口出

SW1

ip routing 先打开路由功能

interface range f0/2-3

channel-group 1 mode on 做channel

interface Port-channel 1

switchport trunk encapsulation dot1q

switchport mode trunk 此接口为trunk

interface FastEthernet0/1 配置IP

no switchport

ip address 172.16.0.2 255.255.255.252

ip summary-address eigrp 100 172.16.0.0 255.255.252.0 vlan2和vlan3的汇总

vtp domain ccna 做vtp

vtp passwd 123

vtp mode server

vlan 2 创建vlan

vlan 3

interface FastEthernet0/5

switchport trunk native vlan 2 vlan 2为native vlan

interface FastEthernet0/6

switchport trunk native vlan 3 vlan 3 为native vlan

spanning-tree vlan 2 root priority 做vlan 2 的主根

spanning-tree vlan 3 root secondary vlan 3 的备份根

interface Vlan2

ip address 172.16.1.1 255.255.255.128

standby 1 ip 172.16.1.126 虚拟网关地址

standby 1 priority 101 优先级高一点

standby 1 preempt 开启抢占

standby 1 track FastEthernet0/1 上行链路追踪

router eigrp 100 eigrp协议

network 172.16.0.0

auto-summary

interface Vlan3

ip address 172.16.1.129 255.255.255.128

standby 1 ip 172.16.1.254 虚拟网关地址

standby 1 preempt

standby 1 track FastEthernet0/1

ip dhcp pool v2

network 172.16.1.0 255.255.255.128

default-router 172.16.1.126

dns-server 8.8.8.8

ip dhcp pool v3

network 172.16.1.128 255.255.255.128

default-router 172.16.1.254

dns-server 8.8.8.8

SW2 配置基本和SW1一样

SW3

interface FastEthernet0/1 做DTP

switchport mode dynamic desirable

interface FastEthernet0/2

switchport mode dynamic desirable

interface FastEthernet0/3 把接口划入vlan

switchport mode access

switchport access vlan 2

interface FastEthernet0/4

switchport mode access

switchport access vlan 3

SW4,SW5配置和SW3基本一样

配置到这里就完了,大家有什么问题可以评论里问

---------------------

作者:LYDlsj

来源:CSDN

原文:https://blog.csdn.net/LYDlsj/article/details/84075844

版权声明:本文为博主原创文章,转载请附上博文链接!

相关推荐