Table of contents
Experiment 6-3 BFD and VRRP linkage configuration experiment
Step 1. IP addressing and basic configuration
Step 2. OSPF and Static Routing Configuration
Experiment 6-3 BFD and VRRP linkage configuration experiment
Experimental objectives
Master the linkage between BFD and VRRP to detect non-directly connected interfaces
Topology
Scenes
R1 is interconnected through two switches S1, S2, R2, and R3. R2 and R3 run VRRP as the gateway of R4 and R5 in the LAN. R2 works in VRRP MASTER mode, and R3 works in BACKUP mode. To avoid routing blackholes caused by uplink traffic being forwarded from R2 after the indirect uplink of R2 goes down, configure BFD to associate with VRRP. When the interconnection interface between R1 and R2 goes down, the VRRP priority of R2 is immediately lowered, and R3 acts as the master to forward uplink traffic.
Learning tasks
Step 1. IP addressing and basic configuration
Configure IP address information for all routers.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.0.1.1 24
[R1-LoopBack0]quit
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/1]quit
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ip address 10.0.13.1 24
[R1-GigabitEthernet0/0/2]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface LoopBack 0
[R2-LoopBack0]ip address 10.0.2.2 24
[R2-LoopBack0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[R2-GigabitEthernet0/0/1]quit
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.45.2 24
[R2-GigabitEthernet0/0/0]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface LoopBack 0
[R3-LoopBack0]ip address 10.0.3.3 24
[R3-LoopBack0]quit
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.13.2 24
[R3-GigabitEthernet0/0/2]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.45.3 24
[R3-GigabitEthernet0/0/0]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.45.4 24
[R4-GigabitEthernet0/0/0]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.45.5 24
[R5-GigabitEthernet0/0/0]quit
To avoid interference, divide VLANs on SW1 and SW2 respectively:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan 12
[SW1-vlan12]quit
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 12
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 12
[SW1-GigabitEthernet0/0/2]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan 13
[SW2-vlan13]quit
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port default vlan 13
[SW2-GigabitEthernet0/0/1]quit
[SW2]interface GigabitEthernet 0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access
[SW2-GigabitEthernet0/0/3]port default vlan 13
[SW2-GigabitEthernet0/0/3]quit
Check the address configuration after configuration:
[R1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 9
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 6
Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
GigabitEthernet0/0/0 unassigned up down
GigabitEthernet0/0/1 10.0.12.1/24 up up
GigabitEthernet0/0/2 10.0.13.1/24 up up
GigabitEthernet0/0/3 unassigned up down
LoopBack0 10.0.1.1/24 up up(s)
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial2/0/0 unassigned up down
Serial3/0/0 unassigned up up
Serial4/0/0 unassigned down down
[R2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 9
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 7
Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
Ethernet4/0/0 unassigned down down
Ethernet4/0/1 unassigned down down
GigabitEthernet0/0/0 192.168.45.2/24 up up
GigabitEthernet0/0/1 10.0.12.2/24 up up
GigabitEthernet0/0/2 unassigned up down
GigabitEthernet0/0/3 unassigned up down
LoopBack0 10.0.2.2/24 up up(s)
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial2/0/0 unassigned up up
Serial3/0/0 unassigned up down
[R3]dislay ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 9
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 7
Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
Ethernet4/0/0 unassigned down down
Ethernet4/0/1 unassigned down down
GigabitEthernet0/0/0 192.168.45.3/24 up up
GigabitEthernet0/0/1 unassigned up down
GigabitEthernet0/0/2 10.0.13.2/24 up up
GigabitEthernet0/0/3 unassigned up down
LoopBack0 10.0.3.3/24 up up(s)
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up down
Serial2/0/0 unassigned up up
Serial3/0/0 unassigned up up
[R4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 5
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 8
Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
Ethernet2/0/0 unassigned up down
Ethernet2/0/1 unassigned down down
GigabitEthernet0/0/0 192.168.45.4/24 up up
GigabitEthernet0/0/1 unassigned up down
GigabitEthernet0/0/2 unassigned down down
GigabitEthernet0/0/3 unassigned up down
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial1/0/1 unassigned down down
[R5]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
(E): E-Trunk down
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 5
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 8
Interface IP Address/Mask Physical Protocol
Cellular0/0/0 unassigned down down
Cellular0/0/1 unassigned down down
Ethernet2/0/0 unassigned up down
Ethernet2/0/1 unassigned down down
GigabitEthernet0/0/0 192.168.45.5/24 up up
GigabitEthernet0/0/1 unassigned up down
GigabitEthernet0/0/2 unassigned down down
GigabitEthernet0/0/3 unassigned up down
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial1/0/1 unassigned down down
Check the connectivity of R1 to R2 and R3:
[R1]ping 10.0.12.2
PING 10.0.12.2: 56 data bytes, press CTRL_C to break
Request time out
Reply from 10.0.12.2: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.12.2: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.12.2: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.12.2: bytes=56 Sequence=5 ttl=255 time=1 ms
--- 10.0.12.2 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 1/1/1 ms
[R1]ping 10.0.13.2
PING 10.0.13.2: 56 data bytes, press CTRL_C to break
Request time out
Reply from 10.0.13.2: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.0.13.2: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.0.13.2: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.0.13.2: bytes=56 Sequence=5 ttl=255 time=1 ms
--- 10.0.13.2 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 1/1/1 ms
Step 2. OSPF and Static Routing Configuration
Configure OSPF on R1, R2, and R3 according to the topology. For LAN routing, import OSPF through network, but you need to enable silent-interface:
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]quit
[R1-ospf-1]quit
Modify the OSPF overhead on R1 so that the route selection of downlink traffic is mainly in the direction of R2:
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ospf cost 90
[R1-GigabitEthernet0/0/1]quit
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ospf cost 100
[R1-GigabitEthernet0/0/2]quit
[R2]ospf 1
[R2-ospf-1]silent-interface GigabitEthernet 0/0/0
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.45.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ospf cost 90
[R2-GigabitEthernet0/0/1]quit
[R3]ospf 1
[R3-ospf-1]silent-interface GigabitEthernet 0/0/0
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 192.168.45.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.0.13.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]quit
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ospf cost 100
[R3-GigabitEthernet0/0/2]quit
Check routing information after OSPF neighbors converge:
[R1]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.2/32 OSPF 10 90 D 10.0.12.2 GigabitEthernet0/0/1
10.0.3.3/32 OSPF 10 100 D 10.0.13.2 GigabitEthernet0/0/2
192.168.45.0/24 OSPF 10 91 D 10.0.12.2 GigabitEthernet0/0/1
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
[R2]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.1/32 OSPF 10 90 D 10.0.12.1 GigabitEthernet0/0/1
10.0.3.3/32 OSPF 10 190 D 10.0.12.1 GigabitEthernet0/0/1
10.0.13.0/24 OSPF 10 190 D 10.0.12.1 GigabitEthernet0/0/1
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
[R3]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.1/32 OSPF 10 100 D 10.0.13.1 GigabitEthernet0/0/2
10.0.2.2/32 OSPF 10 190 D 10.0.13.1 GigabitEthernet0/0/2
10.0.12.0/24 OSPF 10 190 D 10.0.13.1 GigabitEthernet0/0/2
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
Finally, configure the default route on R4 and R5 to point to the VRRP address:
[R4]ip route-static 0.0.0.0 0 192.168.45.1
[R5]ip route-static 0.0.0.0 0 192.168.45.1
Step 3. Configure VRRP
Configure VRRP on the downlink interfaces of R2 and R3:
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]vrrp vrid 45 virtual-ip 192.168.45.1
[R2-GigabitEthernet0/0/0]vrrp vrid 45 priority 150
[R2-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]vrrp vrid 45 virtual-ip 192.168.45.1
[R3-GigabitEthernet0/0/0]quit
Check the VRRP master and backup status:
[R2]display vrrp
GigabitEthernet0/0/0 | Virtual Router 45
State : Master
Virtual IP : 192.168.45.1
Master IP : 192.168.45.2
PriorityRun : 150
PriorityConfig : 150
MasterPriority : 150
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-012d
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-09-25 15:18:54
Last change time : 2016-09-25 15:18:57
[R3]display vrrp
GigabitEthernet0/0/0 | Virtual Router 45
State : Backup
Virtual IP : 192.168.45.1
Master IP : 192.168.45.2
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 150
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-012d
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2016-09-25 15:21:49
Last change time : 2016-09-25 15:21:49
Step 4. Configure BFD linkage
Enable BFD on R1 and R2, and configure VRRP association. If the BFD detection fails, immediately lower the priority:
[R1]bfd
[R1-bfd]quit
[R1]bfd 1 bind peer-ip 192.168.45.2 source-ip 10.0.12.1 auto
[R1-bfd-session-1]commit
[R1-bfd-session-1]quit
[R2]bfd
[R2-bfd]quit
[R2]bfd 1 bind peer-ip 10.0.12.1 source-ip 192.168.45.2 auto
[R2-bfd-session-1]commit
[R2-bfd-session-1]quit
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]vrrp vrid 45 track bfd-session session-name 1 reduce 60
Check linkage configuration:
[R2]display vrrp
GigabitEthernet0/0/0 | Virtual Router 45
State : Master
Virtual IP : 192.168.45.1
Master IP : 192.168.45.2
PriorityRun : 150
PriorityConfig : 150
MasterPriority : 150
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-012d
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track BFD : 1 Priority reduced : 60
BFD-session state : UP
Create time : 2016-09-25 15:18:54
Last change time : 2016-09-25 15:18:57
Check the BFD session:
[R2]display bfd session all
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
8192 8192 10.0.12.1 Up S_AUTO_PEER -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
To test the BFD effect, first enable long ping on R4 and then shutdown on R1 interface:
[R4]ping -c 100 10.0.1.1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown
Observe the result of ping on R4:
[R4]ping -c 100 10.0.1.1
PING 10.0.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=5 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=6 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=7 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=8 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=9 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=10 ttl=254 time=1 ms
Request time out
Request time out
Reply from 10.0.1.1: bytes=56 Sequence=13 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=14 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=15 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=16 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=17 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=18 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=19 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=20 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=21 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=22 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=23 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=24 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=25 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=26 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=27 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=28 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=29 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=30 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=31 ttl=254 time=1 ms
Reply from 10.0.1.1: bytes=56 Sequence=32 ttl=254 time=1 ms
--- 10.0.1.1 ping statistics ---
32 packet(s) transmitted
30 packet(s) received
6.25% packet loss
round-trip min/avg/max = 1/1/1 ms
View the VRRP status at this time:
[R2]display vrrp
GigabitEthernet0/0/0 | Virtual Router 45
State : Backup
Virtual IP : 192.168.45.1
Master IP : 192.168.45.3
PriorityRun : 90
PriorityConfig : 150
MasterPriority : 100
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-012d
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Track BFD : 1 Priority reduced : 60
BFD-session state : DOWN
Create time : 2016-09-25 15:18:54
Last change time : 2016-09-25 15:27:26
BFD associated with VRRP successfully detects the indirect uplink. The conclusion on R5 is the same as that on R4, and the inspection is omitted.
Configuration file reference
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
bfd
#
interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.0
ospf cost 90
#
interface GigabitEthernet0/0/2
ip address 10.0.13.1 255.255.255.0
ospf cost 100
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
bfd 1 bind peer-ip 192.168.45.2 source-ip 10.0.12.1 auto
commit
#
ospf 1
area 0.0.0.0
network 10.0.1.0 0.0.0.255
network 10.0.12.0 0.0.0.255
network 10.0.13.0 0.0.0.255
#
return
<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
bfd
#
interface GigabitEthernet0/0/0
ip address 192.168.45.2 255.255.255.0
vrrp vrid 45 virtual-ip 192.168.45.1
vrrp vrid 45 priority 150
vrrp vrid 45 track bfd-session session-name 1 reduced 60
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
ospf cost 90
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
bfd 1 bind peer-ip 10.0.12.1 source-ip 192.168.45.2 auto
commit
#
ospf 1
silent-interface GigabitEthernet0/0/0
area 0.0.0.0
network 10.0.2.0 0.0.0.255
network 10.0.12.0 0.0.0.255
network 192.168.45.0 0.0.0.255
#
return
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
interface GigabitEthernet0/0/0
ip address 192.168.45.3 255.255.255.0
vrrp vrid 45 virtual-ip 192.168.45.1
#
interface GigabitEthernet0/0/2
ip address 10.0.13.2 255.255.255.0
ospf cost 100
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
ospf 1
silent-interface GigabitEthernet0/0/0
area 0.0.0.0
network 10.0.3.0 0.0.0.255
network 10.0.13.0 0.0.0.255
network 192.168.45.0 0.0.0.255
#
return
<R4>display current-configuration
[V200R007C00SPC600]
#
sysname R4
#
interface GigabitEthernet0/0/0
ip address 192.168.45.4 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.45.1
#
return
<R5>display current-configuration
[V200R007C00SPC600]
#
sysname R5
#
interface GigabitEthernet0/0/0
ip address 192.168.45.5 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.45.1
#
return
<SW1>display current-configuration
!Software Version V200R008C00SPC500
#
sysname SW1
#
vlan batch 12
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 12
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 12
#
return
<SW2>display current-configuration
!Software Version V200R008C00SPC500
#
sysname SW2
#
vlan batch 13
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 13
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 13
#
return