
conf t
enable password spoto
hostname R1
int f0/0
ip add 10.1.2.254 255.255.255.0
ip add 10.1.1.254 255.255.255.0 secondary
no shut
int f1/0
ip add 10.1.3.6 255.255.255.252
no shut
int f0/0
no ip address
no shutdown
ip nat inside
exit
int f0/0.10
encapsulation dot1q 10
ip add 10.1.1.254 255.255.255.0
exit
int f0/0.20
encapsulation dot1q 20
ip add 10.1.2.254 255.255.255.0
exit
int f0/0.40
encapsulation dot1q 40
ip add 10.1.4.2 255.255.255.0
exit
router ospf 1
router-id 10.1.3.10
network 10.1.3.4 0.0.0.3 area 0
network 10.1.3.8 0.0.0.3 area 0
network 10.1.1.0 0.0.0.255 area 0
network 10.1.2.0 0.0.0.255 area 0
exit
int f0/0
ip policy route-map spoto
exit
route-map spoto permit 10
match ip address 1
set ip next-hop 10.1.3.9
exit
route-map spoto permit 20
match ip address 2
set ip next-hop 10.1.3.5
exit
access-list 1 permit 10.1.1.0 0.0.0.255
access-list 2 permit 10.1.2.0 0.0.0.255
ip nat inside source static tcp 10.1.2.1 1723 int f1/0 1723
int f0/0
ip add 10.1.2.254 255.255.255.0
ip add 10.1.1.254 255.255.255.0 secondary
no shut
