Dual-nat Routing test, using ospf Dynamic Routing

Source: Internet
Author: User

Test environment:
One router (R2) has three interfaces, one connected to the internal network, two connected to ISP1 (R1) and ISP2 (R3), and the two ISP outlets are connected to the same switch, then, a router (route) is connected outside the vswitch. Two ISPs (R1, R3, and router) use the ospf dynamic route, and then the policy route is made on R2, route is determined based on the next hop address.
  
                     
--- R3 ---
Route --- ---- R2 ---- internal network
--- R1 ---
  

  
R3 # sh run
Building configuration...
  
Current configuration: 902 bytes
  
Version 12.2:
Service timestamps debug uptime
Service timestamps log uptime
No service password-encryption
  
Hostname R3
  
Enable secret 5 $1 $ yd5D $ PSCihTgQQhhAsLJRhZYBI.
  
Ip subnet-zero
No ip domain-lookup
Ip host R3 192.168.23.3
  
  
  
  
 
Nterface Loopback0
Ip address 3.3.3.3 255.255.255.0
  
Interface Ethernet0
Ip address 172.16.13.3 255.255.255.0
  
Interface Serial0
No ip address
Shutdown
 
Interface Serial1
Ip address 192.168.23.3 255.255.255.0
  
Router ospf 1
Router-id 3.3.3.3
Log-adjacency-changes
Redistribute connected subnets
Redistribute static subnets
Network 172.16.255.0.0.255 area 0
  
Ip classless
Ip route 192.168.100.0 255.255.255.0 192.168.23.2
Ip http server
  
Snmp-server community public RO
Snmp-server community private RW
Snmp-server enable traps tty
  
Line con 0
Logging synchronous
Line aux 0
Line vty 0 4
Password cisco
Logging synchronous
Login
  
End
  
R3 #
  
  
R2 #
R2 # sh run
Building configuration...
  
Current configuration: 1667 bytes
  
Version 12.1:
No service single-slot-reload-enable
Service timestamps debug uptime
Service timestamps log uptime
No service password-encryption
  
Hostname R2
  
Logging rate-limit console 10 TB t errors
Enable secret 5 $1 $ yOVt $ dwGkyiFW674ow6bsPMdgZ0
  
Ip subnet-zero
No ip finger
No ip domain-lookup
Ip host R2 192.168.12.1
Ip host R3 192.168.23.3
  
Central event-service server
  
  
  
  
  
Interface Loopback0
Ip address 2.2.2.2 255.255.255.0
  
Interface Ethernet0
Ip address 192.168.100.107 255.255.255.0
Ip nat inside
  
Interface Serial0
Ip address 192.168.12.2 255.255.255.0
Ip nat outside
Clockrate 64000
  
Interface Serial1
Ip address 192.168.23.2 255.255.255.0
Ip nat outside
Clockrate 64000
  
Interface serial
No ip address
Shutdown
 
Interface seri_3
No ip address
Shutdown
  
Interface BRI0
No ip address
Shutdown
  
Ip kerberos source-interface any
Ip nat inside source route-map nat interface Serial1 overload
Ip nat inside source route-map test interface Serial0 overload
Ip classless
Ip route 172.16.255.255.255.255.255.0 192.168.23.3
Ip route 172.16.20.255.255.255.0 192.168.12.1
No ip http server
  
Acess-list 1 permit 192.168.100.199
Access-list 1 permit 192.168.100.233
Access-list 1 permit 192.168.100.htm
Access-list 9 permit 192.168.12.1
Access-list 10 permit 192.168.23.3
Route-map test permit 10
Match ip address 1
Match ip next-hop 9
  
Route-map cisco permit 10
  
Route-map nat permit 10
Match ip address 1
Match ip next-hop 10
  
  
Snmp-server community public RO
Snmp-server community private RW
  
Line con 0
Logging synchronous
Transport input none
Line aux 0
Line vty 0 4
Password cisco
Logging synchronous
Login
  
End
  
R2 #
  
  
R1 # sh run
Building configuration...
  
Current configuration: 1017 bytes
  
Version 12.1:
No service single-slot-reload-enable
Service timestamps debug uptime
Service timestamps log uptime
No service password-encryption
  
Hostname R1
  
No logging rate-limit
Enable secret 5 $1 $ Ogll $ BSpS5/nOBq8HtaKfwOZ8W0
  
Ip subnet-zero
No ip finger
No ip domain-lookup
  
Frame-relay switching
Central event-service server
  
  
  
  
  
Interface Loopback0
Ip address 4.4.4.4 255.255.255.0
  
Interface Ethernet0
Ip address 172.16.13.1 255.255.255.0
  
Interface Serial0
Ip address 192.168.12.1 255.255.255.0
 
Interface Serial1
No ip address
  
Router ospf 1
Router-id 4.4.4
Log-adjacency-changes
Redistribute connected subnets
Redistribute static subnets
Network 172.16.255.0.0.255 area 0
!
Ip kerberos source-interface any
Ip classless
Ip route 192.168.100.0 255.255.255.0 192.168.12.2
Ip http server
  
  
Snmp-server community public RO
Snmp-server community private RW
  
Line con 0
Logging synchronous
Transport input none
Line aux 0
Line vty 0 4
Password cisco
Logging synchronous
Login
  
End
  
R1 #
  
Router # sh run
Building configuration...
  
Current configuration: 769 bytes
 
Version 12.2:
Service timestamps debug datetime msec
Service timestamps log datetime msec
No service password-encryption
  
Hostn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.