简单网络配置

简单网络配置

为莲花等地区用户提供了全套网页设计制作服务,及莲花网站建设行业解决方案。主营业务为网站设计制作、网站设计、莲花网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!


sw1:
配置vlan:
[sw1]vlan batch 10 20
[sw1]int e0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 10
[sw1-Ethernet0/0/1]int e0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 20
[sw1]port-group 1
[sw1-port-group-1]group-member e0/0/3 e0/0/4
[sw1-port-group-1]port link-type trunk
[sw1-port-group-1]port trunk allow-pass vlan all

save

sw2:
配置vlan:
[sw2]vlan batch 10 30
[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 10
[sw2-Ethernet0/0/1]int e0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 30
[sw2]port-group 1
[sw2-port-group-1]group-member e0/0/3 e0/0/4
[sw2-port-group-1]port link-type trunk
[sw2-Ethernet0/0/1]port trunk allow-pass vlan all

save

sw3:
配置vlan:
[sw3]vlan batch 20 30
[sw3]int e 0/0/1
[sw3-Ethernet0/0/1]port link-type access
[sw3-Ethernet0/0/1]port default vlan 20
[sw3-Ethernet0/0/1]int e0/0/2
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]port default vlan 30
[sw3-port-group-1]group-member e0/0/3 e0/0/4
[sw3-port-group-1]port link-type trunk
[sw3-port-group-1]port trunk allow-pass vlan all

save

lsw4:
配置vlan:
[lsw4]vlan batch 10 20 30
[lsw4]port-group 1
[lsw4-port-group-1]group-member g0/0/1 to g0/0/4
[lsw4-port-group-1]port link-type trunk
[lsw4-port-group-1]port trunk allow-pass vlan all
配置vrrp:
[lsw4]int Vlanif 10
[lsw4-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[lsw4-Vlanif10]vrrp vrid 10 priority 200
[lsw4-Vlanif10]int vlanif 20
[lsw4-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[lsw4-Vlanif20]vrrp vrid 20 priority 200
[lsw4-Vlanif20]int vlanif 30
[lsw4-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254

[lsw4]int vlanif 10
[lsw4-Vlanif10]ip add 192.168.10.253 24
[lsw4-Vlanif10]int vlanif 20
[lsw4-Vlanif20]ip add 192.168.20.253 24
[lsw4-Vlanif20]int vlanif 30
[lsw4-Vlanif30]ip add 192.168.30.253 24

[lsw4]dis vrrp bri

浮动路由:
[lsw4]vlan 2
[lsw4]int vlanif 2
[lsw4-Vlanif2]ip add 192.168.1.1 24

[lsw4]int g0/0/5
[lsw4-GigabitEthernet0/0/5]port link-type access
[lsw4-GigabitEthernet0/0/5]port default vlan 2

[lsw4]int vlanif 10
[lsw4-Vlanif10]vrrp vrid 10 track interface g0/0/5 reduced 110
[lsw4-Vlanif10]int vlanif 20
[lsw4-Vlanif20]vrrp vrid 20 track interface g0/0/6 reduced 110

[lsw4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2

DHCP配置:
[lsw4]dhcp enable
[lsw4]ip pool v10
[lsw4-ip-pool-v10]network 192.168.10.0 mask 24
[lsw4-ip-pool-v10]gateway-list 192.168.10.254
[lsw4]int vlanif 10
[lsw4-Vlanif10]dhcp select global

[lsw4]display ip interface brief

lsw5:
配置vlan:
[lsw5]vlan batch 10 20 30
[lsw5]port-group 1
[lsw5-port-group-1]group-member g0/0/1 to g0/0/4
[lsw5-port-group-1]port link-type trunk
[lsw5-port-group-1]port trunk allow-pass vlan all
配置vrrp:
[lsw5]int vlanif 10
[lsw5-Vlanif10]vrrp vrid 10 virtual-ip 192.168.10.254
[lsw5-Vlanif10]int vlanif 20
[lsw5-Vlanif20]vrrp vrid 20 virtual-ip 192.168.20.254
[lsw5-Vlanif20]int vlanif 30
[lsw5-Vlanif30]vrrp vrid 30 virtual-ip 192.168.30.254
[lsw5-Vlanif30]vrrp vrid 30 priority 200

[lsw5]int vlanif 10
[lsw5-Vlanif10]ip add 192.168.10.252 24
[lsw5-Vlanif10]int vlanif 20
[lsw5-Vlanif20]ip add 192.168.20.252 24
[lsw5-Vlanif20]int vlanif 30
[lsw5-Vlanif30]ip add 192.168.30.252 24

[lsw5]dis vrrp bri

浮动路由:
[lsw5]vlan batch 2 3
[lsw5]int vlanif 2
[lsw5-Vlanif2]ip add 192.168.2.1 24
[lsw5-Vlanif2]int vlanif 3
[lsw5-Vlanif3]ip add 192.168.3.254 24

[lsw4]int g0/0/5
[lsw4-GigabitEthernet0/0/5]port link-type access
[lsw4-GigabitEthernet0/0/5]port default vlan 3

[lsw4]int g0/0/6
[lsw4-GigabitEthernet0/0/6]port link-type access
[lsw4-GigabitEthernet0/0/6]port default vlan 2

[lsw5]int vlanif 30
[lsw5-Vlanif30]vrrp vrid 30 track interface g0/0/6 reduced 110

[lsw5]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2

DHCP配置:
[lsw5]dhcp enable
[lsw5]ip pool v20
[lsw5-ip-pool-v20]network 192.168.20.0 mask 24
[lsw5-ip-pool-v20]gateway-list 192.168.20.254
[lsw5]int vlanif 20
[lsw5-Vlanif20]dhcp select global

[lsw5]ip pool v30
[lsw5-ip-pool-v30]network 192.168.30.0 mask 24
[lsw5-ip-pool-v30]gateway-list 192.168.20.254
[lsw5]int vlanif 30
[lsw5-Vlanif20]dhcp select global

r1:
浮动路由:
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.2 24
[r1-GigabitEthernet0/0/1]int g0/0/2
[r1-GigabitEthernet0/0/2]ip add 192.168.2.2 24
[r1-GigabitEthernet0/0/2]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.100.1 24

[r1]ip route-static 192.168.10.0 24 192.168.1.1
[r1]ip route-static 192.168.10.0 24 192.168.2.1 preference 70
[r1]ip route-static 192.168.20.0 24 192.168.1.1
[r1]ip route-static 192.168.20.0 24 192.168.2.1 preference 70
[r1]ip route-static 192.168.30.0 24 192.168.2.1
[r1]ip route-static 192.168.30.0 24 192.168.1.1 preference 70


新闻名称:简单网络配置
文章地址:http://pwwzsj.com/article/peecep.html