Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Routing and Forwarding by Interface name not working

Status
Not open for further replies.

Alterac

Technical User
Jun 19, 2002
171
0
0
CA
Cisco 2611 Dual Ethernet
IOS ver: 12.1(2)T
Features: c2600-i-mz.121-2T
Flash: 8mb
Ram: 32mb

Heres my problem
Commands like:

ip route 0.0.0.0 0.0.0.0 Ethernet0/0
and
ip nat inside source static udp 192.168.0.2 6112 interface Ethernet0/0 6112 extendable

Dont Work. The first one is accepted, but the 2nd has an error. But the route still doesnt work until I replace Ethernet0/0 with the ip address of the next hop. But I dont want to do that because it changes with my ip address.

Any help?

- Bill
 
Can't do that. I have the same issue. I have to use the IP and when it changes I change the port static. Kinda stinks but do not know of another way but I am always looking!
 
Your default route is actually probably working, I'm guessing that since your trying to NAT your traffic going to E0/0 that unless you get the NAT to work, the network that hangs off E0/0 doesn't know how to route back to you.

On the NAT command try:

ip nat in sou stat 192.168.0.2 int e0/0
 
When I issue this command I get and error at the int keyword.

Code:
ip nat in sou stat 192.168.0.2 int e0/0
                               ^

Right now this is my whole config
Id like to eliminate any reference to my external IP by using the Ethernet0/0 keywords so i dont have to recode everything when my ip changes. Could this be and IOS version problem?

Code:
version 12.1
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname pes
!
enable secret
!
!
ip subnet-zero
ip domain-name homeip.net
ip name-server 24.71.223.144
ip name-server 24.71.223.145
ip dhcp excluded-address 192.168.0.1
!
ip dhcp pool PES
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
   dns-server 24.71.223.144 24.71.223.145
   lease 0 8
!
!
interface Ethernet0/0
 ip address dhcp
 ip access-group 107 in
 ip nat outside
 arp timeout 1500
 no cdp enable
!
interface Ethernet0/1
 ip address 192.168.0.1 255.255.255.0
 ip nat inside
!
ip nat inside source list 102 interface Ethernet0/0 overload
ip nat inside source static udp 192.168.0.2 27015 68.147.174.101 27015 extendable
ip nat inside source static udp 192.168.0.2 6112 68.147.174.101 6112 extendable
ip nat inside source static tcp 192.168.0.11 8000 68.147.174.101 8000 extendable
ip nat inside source static tcp 192.168.0.11 6669 68.147.174.101 23 extendable
ip nat inside source static tcp 192.168.0.11 22 68.147.174.101 22 extendable
ip nat inside source static tcp 192.168.0.11 21 68.147.174.101 21 extendable
ip nat inside source static tcp 192.168.0.11 80 68.147.174.101 80 extendable
!
ip route 0.0.0.0 0.0.0.0 68.147.174.1
!
ip classless
no ip http server
!
access-list 102 permit ip 192.168.0.0 0.0.0.255 any
access-list 107 deny   tcp any any eq finger
access-list 107 permit ip any any
!
line con 0
 transport input none
line aux 0
line vty 0 4
 password
 login
!
end
 
Ok, I updated to 12.1(3)T from 12.1(2)T and now the port forwarding works with the interface names.

Now onto the next problem the default next hop route

ip route 0.0.0.0 0.0.0.0 Ethernet0/0 <- Doesnt Work
ip route 0.0.0.0 0.0.0.0 68.147.174.1 <- Works

Lease info:

Code:
sh dhcp lease
Temp IP addr: 68.147.174.101  for peer on Interface: Ethernet0/0
Temp  sub net mask: 255.255.254.0
   DHCP Lease server: 24.71.223.144, state: 3 Bound
   DHCP transaction id: 1DDC
   Lease: 172800 secs,  Renewal: 86400 secs,  Rebind: 151200 secs
Temp default-gateway addr: 68.147.174.1
   Next timer fires after: 23:38:56
   Retry count: 0   Client-ID: cisco-0002.165a.34e0-Et0/0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top