ex8b_VLAN_EC

ex8b_VLAN_EC

Router

R1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
enable
configure terminal
hostname R1
interface FastEthernet0/0
no shutdown
interface FastEthernet0/0.1xy
encapsulation dot1Q 1xy
ip address 192.168.11.1 255.255.255.0
interface FastEthernet0/0.1xy+1
encapsulation dot1Q 1xy+1
ip address 192.168.12.1 255.255.255.0
interface FastEthernet0/0.2xy
encapsulation dot1Q 2xy
ip address 192.168.2.1 255.255.255.0
interface Serial0/3/0
ip address 10.255.255.6 255.255.255.248
clock rate 1000000
no shutdown
exit
router ospf xy
network 192.168.11.0 0.0.0.255 area xy
network 192.168.12.0 0.0.0.255 area xy
network 192.168.2.0 0.0.0.255 area xy
network 10.255.255.0 0.0.0.7 area xy
exit
exit
copy running-config startup-config

R3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
enable
configure terminal
hostname R2
interface FastEthernet0/0
ip address 77.77.77.126 255.255.255.0
no shutdown
interface Serial0/2/0
ip address 10.255.255.5 255.255.255.248
clock rate 1000000
no shutdown
exit
router ospf xy
network 10.255.255.0 0.0.0.7 area xy
network 77.77.77.0 0.0.0.255 area xy
exit
exit
copy running-config startup-config

Switch

SW1A

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
enable
configure terminal
interface range FastEthernet0/1-4
channel-group 1 mode on
switchport mode trunk
switchport trunk allowed vlan 1xy-1xy+1
interface port-channel 1
switchport mode trunk
switchport trunk allowed vlan 1xy-1xy+1
interface range FastEthernet0/11-12
switchport access vlan 1xy+1
interface range FastEthernet0/13-14
switchport access vlan 1xy
exit
exit
copy running-config startup-config

SW0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
enable
configure terminal
vlan 1xy+1
exit
interface range FastEthernet0/1-4
channel-group 1 mode on
switchport mode trunk
switchport trunk allowed vlan 1xy-1xy+1
interface port-channel 1
switchport mode trunk
switchport trunk allowed vlan 1xy-1xy+1
interface range FastEthernet0/11-15
switchport access vlan 1xy
interface range FastEthernet0/16-20
switchport access vlan 2xy
interface range FastEthernet0/21-23
switchport access vlan 3xy
interface FastEthernet0/24
switchport trunk allowed vlan 1xy-1xy+1,2xy
switchport mode trunk
exit
exit
copy running-config startup-config
文章目錄
  1. 1. Router
    1. 1.1. R1
    2. 1.2. R3
  2. 2. Switch
    1. 2.1. SW1A
    2. 2.2. SW0
,