本實例爲你們詳細講解單臂路由與靜態路由項目實例分析及應用,實驗拓撲及網絡規劃以下圖:
網絡
要求以下:
1.vlan十、vlan20、vlan30、vlan40的網關在SW1上面;
2.R上面作單臂路由;
3.實現全部PC機網絡互通。ide
第一步:項目配置左邊網絡SW一、SW2和SW3命令以下:
SW1
vlan batch 10 20 30 40
interface Vlanif1
ip address 192.168.100.1 255.255.255.0
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
interface Vlanif30
ip address 192.168.30.254 255.255.255.0
interface Vlanif40
ip address 192.168.40.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass all
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass all
ip route-static 0.0.0.0 0.0.0.0 192.168.100.2
SW2
vlan batch 10 20 30 40
interface Ethernet0/0/1
port link-type access
port default vlan 10
interface Ethernet0/0/2
port link-type access
port default vlan 20
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass all
SW3
vlan batch 10 20 30 40
interface Ethernet0/0/1
port link-type access
port default vlan 30
interface Ethernet0/0/2
port link-type access
port default vlan 40
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass all 測試
第二步:R1配置基本網絡和靜態路由以下
R1
interface GigabitEthernet0/0/0
ip address 192.168.100.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.200.1 255.255.255.0
ip route-static 192.168.10.0 255.255.255.0 192.168.100.1
ip route-static 192.168.20.0 255.255.255.0 192.168.100.1
ip route-static 192.168.30.0 255.255.255.0 192.168.100.1
ip route-static 192.168.40.0 255.255.255.0 192.168.100.1
ip route-static 192.168.50.0 255.255.255.0 192.168.200.2
ip route-static 192.168.60.0 255.255.255.0 192.168.200.23d
第三步,在R2上面配置基本網絡單臂路由和缺省路由,以下:
R2
interface GigabitEthernet0/0/0.1
dot1q termination vid 50
ip address 192.168.50.254 255.255.255.0
arp broadcast enable
interface GigabitEthernet0/0/0.2
dot1q termination vid 60
ip address 192.168.60.254 255.255.255.0
arp broadcast enable
interface GigabitEthernet0/0/1
ip address 192.168.200.2 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 192.168.200.1code
第四步:配置右側SW5和SW6基本網絡
SW5
vlan batch 50 60
interface Ethernet0/0/1
port link-type access
port default vlan 50
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass all
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass all
SW6
vlan batch 50 60
interface Ethernet0/0/1
port link-type access
port default vlan 60
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass allblog
最後,測試和驗證網絡連通性
實驗配置完成!!!!!!