The reference network for configuring RIP’s basic settings is as follows:
Settings for SWX (1)
SWX (1) is connected to three networks: 192.168.0.0/24, 192.168.1.0/24, and 192.168.3.0/24.
Use the network command to register each network.
!
vlan database
vlan 2-3 state enable
!
interface port1.1
switchport
switchport mode access
!
interface port1.2
switchport
switchport mode access
switchport access vlan 2
!
interface port1.3
switchport
switchport mode access
switchport access vlan 3
!
interface vlan1
ip address 192.168.0.1/24
!
interface vlan2
ip address 192.168.1.2/24
!
interface vlan3
ip address 192.168.3.3/24
!
router rip
network 192.168.0.0/24
network 192.168.1.0/24
network 192.168.3.0/24
!
Settings for SWX (2)
SWX (2) is connected to two networks, 192.168.1.0/24 and 192.168.2.0/24.
Use the network command to register each network.
!
vlan database
vlan 2 state enable
!
interface port1.1
switchport
switchport mode access
!
interface port1.2
switchport
switchport mode access
switchport access vlan 2
!
interface vlan1
ip address 192.168.1.1/24
!
interface vlan2
ip address 192.168.2.1/24
!
router rip
network 192.168.1.0/24
network 192.168.2.0/24
!
Settings on SWX (3)
SWX (3) is connected to the 192.168.3.0/24 network.
Use the network command to register each network.
!
interface port1.1
switchport
switchport mode access
!
interface vlan1
ip address 192.168.3.1/24
!
router rip
network 192.168.3.0/24
!
The network command allows you to specify a VLAN interface in addition to specifying a network address.
If a VLAN interface is specified, the network directly connected to that VLAN interface will become the RIP network.
The SWX (3) configuration can be written as follows using the VLAN interface specification:
!
interface port1.1
switchport
switchport mode access
!
interface vlan1
ip address 192.168.3.1/24
!
router rip
network vlan1
!