Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Routing to the internet

Hi, I'm new to Cisco router.

I've been asked to create a network for a hotel internet service.

I'm currently configuring Cisco 1941 (non-wireless), and I've been stuck for a while now.

So, I have 2 network

192.168.0.* (ethernet0/0) and 192.168.1.* (ethernet0/1)

i connect my modem to ethernet0/0 and the client switch to ethernet0/1

I manage to ping the modem from a client, and it's working great.

the problem is i couldn't get through the internet.

is there any configuration that i missed?

and also, is it possible to manage the bandwidth to the client?

Thanks.

Everyone's tags (3)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Purple

Routing to the internet

Hi,

Concerning NAT hat's what I had told you before, these soho models should nat everything entering their inside interface even if the src ip is not in the same subnet as the interface.

The static default route you've got is not correct so delete it and do this:

ip route 0.0.0.0 0.0.0.0 192.168.0.1

Because when doing a static route for a multipoint interface you should specify the next-hop and not the outgoing interface

but that's what you did so your Cisco router is going to ARP for every destination he wants to reach and if the soho router is not doing proxy-arp( which he surely doesn't ) then it can't work.

Regards.

Alain

Don't forget to rate helpful posts.
Hall of Fame Super Blue

Re: Routing to the internet

Wilson / Alain

Apologies for jumping in as i don't want to cause any confusion but i suspect after reading the thread that the issue may be, as already suggested, that the modem is only natting for it's own local subnet. Could you, as Alain has already mentioned, try adding this to your 1941 config and retest -

int gi0/0

ip nat outside

int gi0/1

ip nat inside

access-list 101 permit ip 192.168.1.0 0.0.0.255 any

ip nat inside source list 101 interface gi0/0 overload

and then retest from a PC in the 192.168.1.x network (not the router itself).

Alternatively adding a route for the 192.168.1.0/24 network to the modem pointing to 192.168.0.2 would also be an option but not sure how easy this would be to do.

Can you try the above and retest.

Jon

72 REPLIES
Gold

Routing to the internet

Your service provider needs to allocate a public IP address to you. at that point you perform Network address translation

to allow your clients to share the public address.

New Member

Routing to the internet

I have a public IP address from my ISP.

and i have applied the DHCP service on the router.

so logically there shouldn't be any problem.

Routing to the internet

on your router you need also a NAT, if you'd like to give the Internet access to your  private IP segment. Or proxy-server, which is may be more effective in your case.

New Member

Routing to the internet

you may need to post your current configs. But the general process is

- On your internal network router interfaces you have a "ip nat inside" statement

- On your public interface you have "ip nat outside"

- You then need a NAT  overload statement like

"ip nat inside source list 1 interface ethernet0/0 overload"

- you need a access list for the overload statement to match your internal IP ranges against something like "

access-list 1 permit any" will do it but you may want to make it more specific

- you need a default route statement out your pulbic interface "

ip route 0.0.0.0 0.0.0.0 ethernet0/0" 

Hope this helps

Dave

New Member

Re: Routing to the internet

Here is the current config of the router:

Using 1503 out of 262136 bytes

!

! Last configuration change at 23:51:33 UTC Sun Nov 6 2011

!

version 15.1

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname HotelJakarta

!

boot-start-marker

boot-end-marker

!

!

enable secret 5 $1$qSkP$RaAzZCkUBcimthT07A7OO0

enable password xxxxxx

!

no aaa new-model

!

no ipv6 cef

ip source-route

ip cef

!

!

!

ip dhcp excluded-address 192.168.0.1 192.168.0.10

ip dhcp excluded-address 192.168.1.1 192.168.1.5

!

ip dhcp pool Guests

   network 192.168.1.0 255.255.255.0

   domain-name Guests

   dns-server 192.168.1.1

   netbios-name-server 192.168.1.1

   default-router 192.168.1.1

!

!

multilink bundle-name authenticated

!

crypto pki token default removal timeout 0

!

!

license udi pid CISCO1941/K9 sn FGL1532291Z

!

!

!

!

!

!

!

!

interface GigabitEthernet0/0

ip address 192.168.0.3 255.255.255.0

ip nat outside

ip virtual-reassembly in

duplex auto

speed auto

no mop enabled

!

interface GigabitEthernet0/1

ip address 192.168.1.1 255.255.255.0

ip nat inside

ip virtual-reassembly in

duplex auto

speed auto

!

ip forward-protocol nd

!

no ip http server

no ip http secure-server

!

ip nat pool Guests 192.168.0.2 192.168.0.2 netmask 255.255.255.0

ip nat inside source list 7 pool Guests

ip route 192.168.1.0 255.255.255.0 192.168.0.1

!

access-list 7 permit 192.168.1.0 0.0.0.255

!

!

!

control-plane

!

!

!

line con 0

line aux 0

line vty 0 4

password xxxxxx

login

transport input all

!

scheduler allocate 20000 1000

end

------------------------------------------------------------------------------------

I'll try the NAT statement for sure.

thank you Dave and Konstantin.

Re: Routing to the internet

but you don't translate your private IP into public IP in your config? or it will be done by your ISP?

and you don't hav a default gateway to your "WAN" interface.

New Member

Re: Routing to the internet

isn't it supposed to be done by the internet modem? because the modem also have router capability.

given i have to get it done on the 1941 modem, what are the configs i have to put in?

Routing to the internet

what kind of modem do you use? can you configure it, which IP's have you configured on it?

If  the modem does for you the NAT translation, that you don'need to do it on your 1941, but default gatreway on it,  is still necessary , like "ip route 0.0.0.0 0.0.0.0

New Member

Routing to the internet

Konstantin is correct. The config statements I listed above were if you were bridging the public IP direct onto your 1941 ethernet 0/0 interface. 

Be aware though that if your external modem is doing the NAT you may have to add a static router back to your 1941 ethernet 0/0 interface for the internal 192.168.0.0/16 addresses so that your internal networks cen get traffic back in.

New Member

Re: Routing to the internet

how do i add a static router back to the 1941 ethernet0/0?

New Member

Re: Routing to the internet

the LAN ip address for the modem is 192.168.0.1, therefore I set my ethernet0/0 ip address to 192.168.0.2.

so i should put it like: ip route 0.0.0.0 0.0.0.0 192.168.0.1

did i get it right?

New Member

Re: Routing to the internet

you need to add something like 192.168.0.0 255.255.255.0 send to 192.168.0.2

New Member

Re: Routing to the internet

On the modem that is. this sends all traffic coming in from the public modem to your 1941 router to send onto your internal networks.

"you need to add something like 192.168.0.0 255.255.255.0 send to 192.168.0.2"

New Member

Re: Routing to the internet

having trouble typing.  Should be:

something like 192.168.0.0 255.255.0.0 send to 192.168.0.2

New Member

Re: Routing to the internet

okay.

so on the modem, i should put the command to route the traffic to 192.168.0.2, right?

New Member

Re: Routing to the internet

Based on what you have provided yes.  But just for the 192.168.0.0/16 network

New Member

Re: Routing to the internet

I've done what u said, but still unable to connect to the internet through gigabitethernet0/1 interface.

I have just a normal adsl modem/router with a local ip 192.168.0.1 connected to the cisco1941/k9 gigabitethernet 0/0 with ip 192.168.0.3

then id like to share the internet connection through to the client using the gigabitethernet0/1 interface on the cisco router.

i set the ip address of the g0/1 to 192.168.1.1.

Having established the basic network, i was able to ping from a client (192.168.1.2) to the adsl modem router (192.168.0.1), however the internet connection does not get routed to the 192.168.1.2.

I'm assuming that i've done the ip routing correctly, but something mustve gone wrong when i set up the NAT.

Also, i want to attach a wireless access point to the g0/1 interface using a switch. do i need to set up a new static routing for that?

Here's the specific extract of my setting from show config:

interface GigabitEthernet0/0

ip address 192.168.0.3 255.255.255.0

ip nat outside

ip virtual-reassembly in

duplex auto

speed auto

no mop enabled

!

interface GigabitEthernet0/1

ip address 192.168.1.1 255.255.255.0

ip nat inside

ip virtual-reassembly in

duplex auto

speed auto

ip nat pool Guests 192.168.0.2 192.168.0.2 netmask 255.255.255.0

ip nat inside source list 7 pool Guests

ip route 192.168.1.0 255.255.255.0 192.168.0.1

!

access-list 7 permit 192.168.1.0 0.0.0.255

New Member

Re: Routing to the internet

First and foremost... the IP address applied on your WAN port ... is it a public IP?

Secondly, before you configure the any natting or routing.. simply ping any ip address on the internet and check whether ur reachable to that IP address from your router. Say for example : ping 4.2.2.2

Regards,

Talha

New Member

Re: Routing to the internet

Talha Ansari,

I don't have a WAN interface on my Cisco 1941/k9, I only have the gigabitethernet 0/0 and gigabitethernet 0/1, i want to connect the Cisco router to another adsl modem/router that connects to the internet. So no, none of the IP address applied on any of the ciscos interfaces are public IP, they are all local

New Member

Re: Routing to the internet

so if you apply only ip addresses on the interface ... then r u able to ping 4.2.2.2 from your router?

Purple

Routing to the internet

Hi,

if you are already connected to a modem/router then you don't need to do NAT on your 1941, just let the modem/router do it for you.

But on the modem/router you need a route for 192.168.1.0/24 network and on the 1941 a static default route pointing to modem interface ip address: ip route 0.0.0.0 0.0.0.0 192.168.0.1

You can also get rid of this static route: ip route 192.168.1.0 255.255.255.0 192.168.0.1 because you don't need it here as these interfaces are directly connected to your router.

Regards.

Alain

Don't forget to rate helpful posts.

Routing to the internet

Hi Wilson,

have you found out that your modem/router does a NAT translation?

if yes, please remove from your interface configuration on the 1941 the "ip nat input" and "ip nat output"  commands.

then you still need the "ip route 0.0.0.0 0.0.0.0 192.168.0.1" on your router.

New Member

Re: Routing to the internet

cadet alain and Konstantin Dunaev,

I'm not too sure if my modem/router does a NAT translationm just FYI, i'm using a D-LINK DSL 2740B modem/router to connect to the internet. I can't seem to find any NAT related settings in the setting page.

The options are Port Forwarding, Port Trigering, DNS, Dynamic DNS, SNMP Setup, Static Routing, Default Gateway Routing, RIP Routing

Although i could try to establish a static route to the 192.168.1.0 network from the modem

On a side note, could it be possible that my current problem has something to do with me not using AUX interface to connect to the adsl modem/router ?

Routing to the internet

you modem/router does support NAT translation for sure. You should connect the router to  the modem's LAN interface.

are you able to reach Internet directly from your router? e.g. ping 8.8.8.8

New Member

Re: Routing to the internet

In such scenario I would suggest you to connect a pc/laptop directly to the modem. Set its ip address to automatic from DHCP. Check whether you get the IP address on the PC. Confirm whether you can reach internet from ur pc.

Purple

Routing to the internet

Hi,

It is doing NAT because this is a soho modem/router and you use a private ip address on the LAN and a public on the WAN so it has to do NAT.

Just do the default static on the 1941 and the static route to 192.168.1.0/24 on the modem/router and it should work.

Alain.

Don't forget to rate helpful posts.
New Member

Re: Routing to the internet

Using 1488 out of 262136 bytes

!

! Last configuration change at 17:29:39 UTC Mon Nov 7 2011

!

version 15.1

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname xxxxxx

!

boot-start-marker

boot-end-marker

!

!

enable secret 5 $1$qSkP$RaAzZCkUBcimthT07A7OO0

enable password xxxxxxx

!

no aaa new-model

!

no ipv6 cef

ip source-route

ip cef

!

!

!

ip dhcp excluded-address 192.168.0.1 192.168.0.10

ip dhcp excluded-address 192.168.1.1 192.168.1.5

!

ip dhcp pool Guests

   network 192.168.1.0 255.255.255.0

   domain-name Guests

   dns-server 192.168.1.1

   netbios-name-server 192.168.1.1

   default-router 192.168.1.1

!

!

multilink bundle-name authenticated

!

crypto pki token default removal timeout 0

!

!

license udi pid CISCO1941/K9 sn FGL1532291Z

!

!

!

!

!

!

!

!

interface GigabitEthernet0/0

ip address 192.168.0.2 255.255.255.0

ip virtual-reassembly in

duplex auto

speed auto

no mop enabled

!

interface GigabitEthernet0/1

ip address 192.168.1.1 255.255.255.0

ip virtual-reassembly in

duplex auto

speed auto

!

ip forward-protocol nd

!

no ip http server

no ip http secure-server

!

ip nat pool Guests 192.168.0.2 192.168.0.2 netmask 255.255.255.0

ip nat inside source list 7 interface GigabitEthernet0/0 overload

ip route 0.0.0.0 0.0.0.0 192.168.0.1

!

access-list 7 permit 192.168.1.0 0.0.0.255

!

!

!

control-plane

!

!

!

line con 0

line aux 0

line vty 0 4

password 101289dl

login

transport input all

!

scheduler allocate 20000 1000

end

This is my current configuration, so far nothing has worked, i cant ping to internet from the router

Purple

Routing to the internet

Hi,

Can you verify the dynamic NAT translations were cleared from the router with sh ip nat trans and if not then issue clear ip nat  trans * and then try this:

-ping the public address from the modem/router from the 1941: ping x.x.x.x source int g0/1

Is it working? if so then ping 8.8.8.8 source int g0/1, is it working?

Alain.

Don't forget to rate helpful posts.
New Member

Re: Routing to the internet

cadet alain,

Thanks for the advice, but unfortunately no, it still doesnt work. i tried pinging 1to 8.8.8.8 from either g0/0 and g0/1 but none of it works,

in fact, now even pinging to 192.168.0.1 (the modem router) from the 1941 doesnt work. it worked before, i dont know where it went wrong.

3577
Views
0
Helpful
72
Replies
CreatePlease to create content