cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
48246
Views
325
Helpful
149
Replies
Highlighted
Beginner

how do you connect a cisco router to the internet through a cable modem/ router gateway

I have searched on here but can't find the exact answer i am looking for. I have a cisco 1760 router and a 2950 switch. The router has an ethernet wic card added so i have two ethernet connections available. I would like to connect the cable modem gatway to the router through one of the ethernet connections on the router and then to the switch. I cannot seem to get this setup to work. There are several different ways i have seen posted to accomlish this. dhcp, no dhcp, creating a seperate network, and giving the e0/0 an ip address within the range of the cable gateways network addresses. None of this has worked. Can anybody post the commands that need to be entered on the router to make this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Engager

Re: how do you connect a cisco router to the internet through a

Hello, I am assuming that your ISP is giving out addresses via DHCP....

And I will also assume that we want to set up our router to give out DHCP in our LAN to our PC's and Laptops etc...

So what we need to do is this:

conf t

!

interface e0/0

description ## INTERNET ##

ip access-group MY_WAN in

ip address dhcp

ip nat outside

no shut

!

interface e0/1

description ## MY LAN ##

ip address 192.168.1.1 255.255.255.0

ip nat inside

!

ip access-list standard MY_LAN

permit 192.168.1.0 0.0.0.255

!

ip access-list extended MY_WAN

permit tcp any any established

deny tcp any any

permit ip any any

!

ip nat inside source list MY_LAN interface e0/0 overload

!

ip dhcp excluded-address 192.168.1.0 192.168.1.99

!

ip dhcp pool MY_LAN

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 8.8.4.4 8.8.8.8

In this config I have applied an ACL just for some protection to my router and my internal network to allow only established connections that Ive made from my LAN to come back to me. Anyone trying to initiate a connection to your router will be denied. Everything else is permitted. But you can change this to be more specific rather than broad.

On your switch, if you leave all ports in vlan 1 and have them as access ports, this should work.

Hope this helps

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
149 REPLIES 149
Engager

Re: how do you connect a cisco router to the internet through a

Hello, I am assuming that your ISP is giving out addresses via DHCP....

And I will also assume that we want to set up our router to give out DHCP in our LAN to our PC's and Laptops etc...

So what we need to do is this:

conf t

!

interface e0/0

description ## INTERNET ##

ip access-group MY_WAN in

ip address dhcp

ip nat outside

no shut

!

interface e0/1

description ## MY LAN ##

ip address 192.168.1.1 255.255.255.0

ip nat inside

!

ip access-list standard MY_LAN

permit 192.168.1.0 0.0.0.255

!

ip access-list extended MY_WAN

permit tcp any any established

deny tcp any any

permit ip any any

!

ip nat inside source list MY_LAN interface e0/0 overload

!

ip dhcp excluded-address 192.168.1.0 192.168.1.99

!

ip dhcp pool MY_LAN

network 192.168.1.0 255.255.255.0

default-router 192.168.1.1

dns-server 8.8.4.4 8.8.8.8

In this config I have applied an ACL just for some protection to my router and my internal network to allow only established connections that Ive made from my LAN to come back to me. Anyone trying to initiate a connection to your router will be denied. Everything else is permitted. But you can change this to be more specific rather than broad.

On your switch, if you leave all ports in vlan 1 and have them as access ports, this should work.

Hope this helps

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Beginner

how do you connect a cisco router to the internet through a cab

ok i entered all the commands but it did not work. I have never configured a switch before so i am not sure what to do there. also will this be static or dynamic ip addresses?

Engager

Re: how do you connect a cisco router to the internet through a

Could you be a bit more elaborate please? What didn't work?

Could you kindly post your config and erase any passwords or sensitive information. This way I will be able to assist further.

Thank you

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Beginner

how do you connect a cisco router to the internet through a cab

Sorry, should have been more specific.

Current configuration : 1129 bytes%PQUICC_ETHER-1-LOSTCARR: Unit 0,

!s

! Last configuration change at 02:29:35 UTC Sun Mar 3 2002 Interface FastEtherne                    

problem?

pro

!e

version 12.38:24.711: %L

service timestamps debug datetime msecerface FastEtherneransceiver   

service timestamps log datetime msecs now available     

M

t0/0, change

no service password-encryption7.024:

Mar  3 00:48:24.807: %

!N

hostname Routerrface Ethernet0

!,

!h

no aaa new-modeled from console

ip subnet-zerochanged state

!

!w

ip dhcp excluded-address 192.168.1.0 192.168.1.99%LINK-3-UPDOWN: Interface Seria-UPDOWN: L       

!

ip dhcp pool MY             

changed state to downm

description ## MY LAN ##3 00:48:25.836: %LINEPROT

ip address 192.168.1.1 255.255.255.0 Serial1/1,ip min/avg/max = 1/1/4 ms:

ip nat insideEthernet0/0, c

shutdownte t 

p

speed autod state to

!w

interface Serial1/0ET

Mar  3 00:48:29.

no ip address-5-UPDOWN: Lin

shutdown on Inter

!c

interface Serial1/1rne509: %LINK-5-CHA

no ip address Serial

probl

shutdowne

Mar  2

!2

ip access-list standard MY_LAN

--More--

Mar  3 02:54:00.897: %PQUICC_ETHER-1-LOSTCARR: Unit 0, lost carrier. Transceiver

permit 192.168.1.0 0.0.0.255

!

ip access-list extended MY_WAN

permit tcp any any established

deny   tcp any any

permit ip any any

!

!

line con 0

line aux 0

line vty 0 4

!

no scheduler allocate

!

end

Hall of Fame Master

how do you connect a cisco router to the internet through a cab

Bernard

Thanks for trying to post the config. Unfortunately it seems to be incomplete and quite mixed in its order.

I would also suggest that we wait to talk about the switch until we get the router working. After the router is working it may be quite simple to get the switch working.

So please give us a better output of the running config. And also give us a more specific explanation of what does or what does not work on the router.  (most especially does the router get connected to the provider cable modem? does the router get assigned an IP address? is the router learning a default route from the provider cable mode.?)

HTH

Rick

Beginner

how do you connect a cisco router to the internet through a cab

sorry should have been more specific to begin with. the router does not get an ip address assigned to it. The computers Lan connection says it can see the network but cannot reach the dns server.

Engager

Re: how do you connect a cisco router to the internet through a

Hello Bernard,

from your PC - are you able to ping 192.168.1.1 ?

What do you see when you open cmd and do 'ipconfig'

Do you have an IP address beginning with 192.168....

Just want to make sure the LAN is working properly. Then we can look at why the internet link does not work and why you do not get an IP address.

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Beginner

how do you connect a cisco router to the internet through a cab

i can successfully ping 192.168.1.1 from the pc. my majic jack phone works fine but the computer cannot connect to the Internet. when i click diagnose on the lan sometimes it says ip not configured properly or dns server not reachable and sometimes it says both of them.

Engager

how do you connect a cisco router to the internet through a cab

Wow :-) I can't fully make out what the config is like - your console session must be quite annoying with those messages!

Could you kindly do this please:

router# term len 0

router# show run

and then paste the config again. Thank you.

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Engager

how do you connect a cisco router to the internet through a cab

Also, the switch should have a default config similar to this...

Switch#show run

Building configuration...

Current configuration : 971 bytes

!

version 12.1

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Switch

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

!

interface FastEthernet0/2

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface Vlan1

no ip address

shutdown

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Beginner

how do you connect a cisco router to the internet through a cab

Here is the config after entering those commands. not sure if i have a bad router or what. it is very difficult to enter commands because they keep getting interrupted by the error messages

Building configuration...a0/0ocating add

problem?

Current configuration : 1129 bytes 3 01:52:52.956: %PQUICC_ETHER-1-L

!T

! Last configuration change at 02:29:35 UTC Sun Mar 3 200221 bytes of non-volatile configuration

problem?        

!

version 12.3135:

R1(con

service timestamps debug datetime msec.

R1(config-if)#description ##MY LAN##

service timestamps log datetime msecR1(config-if)#ip address 192.168.1.1

no service password-encryptionETHER-1-LOSTCARR: Unit 0, lost

!a

hostname Router.958: %PQUICC_E

!E

!1

no aaa new-model, lost carrier.

ip subnet-zeromputer Softwa

!r

!l

ip dhcp excluded-address 192.168.1.0 192.168.1.99LOSTCA

problem?s clause

R1(config-if)#ip nat  

!

interface Ethernet0/0        

description ##internet##R1(config-std-nacl)#23:21

ip address dhcpar  3 01:55:52.9

ip access-group MY_WAN inR: Unit 0, lost carrier. T

ip nat outsidel1/0, change

IO

half-duplexSoftware (C1

!0

interface FastEthernet0/0  2 2

problem?9: %PQUIC

description ## MY LAN ##CC_ETHER-1-LOSTCARR: Unit

ip address 192.168.1.1 255.255.255.0chnical Support: http://www.cisco.com

ip nat inside?        

Mar

shutdownblem?1: %

speed auto 01:57:52.9

!:

interface Serial1/0TCARR: Unit 0, lost

no ip addressceiver       

shutdown   

ip classless

!

no ip http server

!

ip access-list standard MY_LAN

permit 192.168.1.0 0.0.0.255

!

ip access-list extended MY_WAN

permit tcp any any established

deny   tcp any any

permit ip any any

!

!

line con 0

line aux 0

line vty 0 4

!

no scheduler allocate

!

end

Engager

Re: how do you connect a cisco router to the internet through a

Oh, okay try this please.. (Assuming you are using console)

conf t

!

no logging console

!

end

This should stop the messages for now.

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Beginner

how do you connect a cisco router to the internet through a cab

this one helped a lot. no more error messages while i am trying to enter commands

Engager

Re: how do you connect a cisco router to the internet through a

Okay great! Making progress.

So we know our LAN is OK...

Do you mind showing us the configuration on the router again please? Just want to make sure it's not the configuration.

Thank you

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards