拓扑图后期添加
交换机A配置:
Console#show running-config
Building running configuration. Please wait...
!
!
vlan database
VLAN 1 name DefaultVlan media ethernet
vlan 10,30,100 media ethernet
!
interface ethernet 1/1
switchport allowed vlan add 10 untagged
switchport mode trunk
switchport native vlan 10
switchport allowed vlan remove 1
!
interface ethernet 1/2
switchport allowed vlan add 100 untagged
switchport mode trunk
switchport native vlan 100
switchport allowed vlan remove 1
!
!
!
!
interface vlan 1
ip address dhcp
!
interface vlan 10
ip address 10.3.1.2 255.255.255.0
!
interface vlan 100
ip address 192.168.111.2 255.255.255.0
!
!
router rip
version 2
!
router bgp 65008
bgp router-id 10.1.1.1
redistribute connected
neighbor 10.3.1.1 remote-as 65009
!
ip domain-lookup
!
interface vlan 1
!
interface vlan 10
!
interface vlan 100
!
交换机B配置
Console#show running-config
Building running configuration. Please wait...
!
vlan database
VLAN 1 name DefaultVlan media ethernet
vlan 2-3,10,20 media ethernet
!
!
interface ethernet 1/1
switchport allowed vlan add 10 untagged
switchport mode trunk
switchport native vlan 10
switchport allowed vlan remove 1
!
interface ethernet 1/2
switchport allowed vlan add 20 untagged
switchport mode trunk
switchport native vlan 20
switchport allowed vlan add 1 tagged
!
interface loopback 0
ip address 2.2.2.2 255.255.255.0
!
interface vlan 1
ip address dhcp
!
interface vlan 2
!
interface vlan 10
ip address 10.3.1.1 255.255.255.0
!
interface vlan 20
ip address 10.9.1.1 255.255.255.0
!
!
!
router bgp 65009
network 10.3.1.0 255.255.255.0
network 10.9.1.0 255.255.255.0
redistribute ospf
neighbor 10.3.1.2 remote-as 65008
neighbor 10.9.1.2 remote-as 65009
!
!
ip domain-lookup
!
!
interface vlan 1
!
interface vlan 2
!
interface vlan 10
!
interface vlan 20
!
交换机C配置
Console#show running-config
Building running configuration. Please wait...
!
vlan database
VLAN 1 name DefaultVlan media ethernet
vlan 20,40 media ethernet
!
interface ethernet 1/1
switchport mode trunk
!
interface ethernet 1/2
switchport allowed vlan add 20 untagged
switchport mode trunk
switchport native vlan 20
switchport allowed vlan remove 1
!
!
!
interface loopback 0
ip address 3.3.3.3 255.255.255.0
!
interface vlan 1
ip address dhcp
!
interface vlan 20
ip address 10.9.1.2 255.255.255.0
!
!
!
router ospf 1
router-id 10.3.3.3
area 1 range 0.0.0.0 0.0.0.0
network 10.9.1.0 255.255.255.0 area 0
!
router bgp 65009
network 10.9.1.0 255.255.255.0
redistribute connected metric 10
redistribute ospf
neighbor 10.9.1.1 remote-as 65009
!
浙公网安备 33010602011771号