cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

284
Views
0
Helpful
7
Replies
Beginner

Cisco Router and Unmangaged Switch (Internet Access)

Hello. I have a home test environment that I would like to see if I can get internet access.
I am using a Cisco 2901 Router and an unmanaged Netgear switch.
I would like to see if I can get internet access to the device connected to the unmanaged switch.
I know I get internet access on the Router so that side is done.
I need to configure the Router to let the devices use it as a gateway.
The thing is I am having trouble with this because it will not let me configure VLAN1, IP address Subnetmask.
Any thoughts?

Thanks

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
VIP Mentor

Re: Cisco Router and Unmangaged Switch (Internet Access)

Hello,

 

below is a sample configuration for a 2901. You don't use Vlan 1, but one of the physical interfaces to connect the unmanaged switch:

 

no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 2901
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
!
no ipv6 cef
ip source-route
ip cef
!
multilink bundle-name authenticated
!
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8 8.8.4.4
!
archive
log config
hidekeys
!
interface GigabitEthernet0/0
description LAN (Netgear)
ip address 192.168.1.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/1
description WAN
ip address x.x.x.x y.y.y.y
ip nat outside
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
no ip http server
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
control-plane
!
!
line con 0
line aux 0
line vty 0 3
login
!
exception data-corruption buffer truncate
scheduler allocate 20000 1000
end

View solution in original post

Highlighted
VIP Advisor

Re: Cisco Router and Unmangaged Switch (Internet Access)

Lets start with basic config before move to advanced level

 

I have modifiled the config :

======================

 

interface GigabitEthernet0/0
ip address dhcp client-id GigabitEthernet0/0
ip directed-broadcast 1
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface GigabitEthernet0/1    <<<--- This port you will connect your HUB
no switchport

ip address 192.168.1.1 255.255.255.0

ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!

access-list 1 permit 192.168.1.0 0.0.0.255

ip nat inside source list 1 interface GigabitEthernet0/0 overload

 

 

Connect one of the PC to your unmanaged switch port

 

configured IP address 192.168.1.2 mask 255.255.255.0 and gateway 192.168.1.1

DNS 8.8.8.8

 

Test

 

1. From PC you should able to ping 192.168.1.1

2. check you able to ping 8.8.8.8

3. browse interface google.com

BB
*** Rate All Helpful Responses ***

View solution in original post

7 REPLIES 7
VIP Advisor

Re: Cisco Router and Unmangaged Switch (Internet Access)

yes possible :

 

PC---Umanaged Switch---Router( where you do NAT here) --Internet

 

you can post current config or give us your Public IP / Priate IP - we try provide working config to test.

 

BB
*** Rate All Helpful Responses ***
Beginner

Re: Cisco Router and Unmangaged Switch (Internet Access)

Thanks for the help BB!

Also I do get an IP from the ISP and I can ping internet IP addresses. I just cant ping any private IP addresses on my LAN

Edit to Add: Please ask if any other info is needed.

 

interface GigabitEthernet0/0
ip address dhcp client-id GigabitEthernet0/0
ip access-group OUTSIDE-IN in
ip directed-broadcast 1
ip nat outside
no ip virtual-reassembly
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!

ip nat inside source list 1 interface GigabitEthernet0/0 overload

ip access-list extended OUTSIDE-IN
deny tcp any any eq telnet
permit ip any any
!
access-list 1 permit 192.168.1.0 0.0.0.255

 

Highlighted
VIP Advisor

Re: Cisco Router and Unmangaged Switch (Internet Access)

Lets start with basic config before move to advanced level

 

I have modifiled the config :

======================

 

interface GigabitEthernet0/0
ip address dhcp client-id GigabitEthernet0/0
ip directed-broadcast 1
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
!
interface GigabitEthernet0/1    <<<--- This port you will connect your HUB
no switchport

ip address 192.168.1.1 255.255.255.0

ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!

access-list 1 permit 192.168.1.0 0.0.0.255

ip nat inside source list 1 interface GigabitEthernet0/0 overload

 

 

Connect one of the PC to your unmanaged switch port

 

configured IP address 192.168.1.2 mask 255.255.255.0 and gateway 192.168.1.1

DNS 8.8.8.8

 

Test

 

1. From PC you should able to ping 192.168.1.1

2. check you able to ping 8.8.8.8

3. browse interface google.com

BB
*** Rate All Helpful Responses ***

View solution in original post

Beginner

Re: Cisco Router and Unmangaged Switch (Internet Access)

Thanks BB that worked!

Thanks for the sample config Georg Pauwen! This answered my next challenge (LAN DHCP) after I got the internet traffic resolved.

Devices connected to Netgear all have internet access.

 

VIP Mentor

Re: Cisco Router and Unmangaged Switch (Internet Access)

The onboard Gigabit ports are routed ports by default, so the'no switchport' command is not necessary, I don't even think you can convert them to layer 2 ports ?

 

You also need the default route, preferably pointing to the next hop IP address, but since the address is acquired through DHCP, it should be:

 

ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0 dhcp

VIP Advisor

Re: Cisco Router and Unmangaged Switch (Internet Access)

@Georg Pauwen  good one...by typing we always think we are in switch port...hahhah ..so it come as typo. end the command has no meaning router. (a s you said until some one made switch port.)

 

BB
*** Rate All Helpful Responses ***
VIP Mentor

Re: Cisco Router and Unmangaged Switch (Internet Access)

Hello,

 

below is a sample configuration for a 2901. You don't use Vlan 1, but one of the physical interfaces to connect the unmanaged switch:

 

no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 2901
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
!
no ipv6 cef
ip source-route
ip cef
!
multilink bundle-name authenticated
!
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8 8.8.4.4
!
archive
log config
hidekeys
!
interface GigabitEthernet0/0
description LAN (Netgear)
ip address 192.168.1.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/1
description WAN
ip address x.x.x.x y.y.y.y
ip nat outside
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
no ip http server
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/1
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
control-plane
!
!
line con 0
line aux 0
line vty 0 3
login
!
exception data-corruption buffer truncate
scheduler allocate 20000 1000
end

View solution in original post

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards