cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1269
Views
25
Helpful
28
Replies

Vlan between switch and router

Goatster
Spotlight
Spotlight

I'm new to all this.

After a factory reset, I can attach the router to the internet with a static ip and ping 8.8.8.8

 

Installed 16port service module sm-es2-16-p. 

 

My goals are to attach all in home network devices to the 16 port switch with DHCP and access internet via the router(edge) and cable modem. 

DHCP is configured and does assign ip's to devices. 

My issue is, fathoming all this vlan. I'm not up to speed on it. 

So, I'm just asking for help how to setup the connection between the internal switch and the router. 

 

So, when advice is offered, please comment the specific commands I need to issue. 

Any help is muchly appreciated.

28 Replies 28

If the etherswitch in in slot 2, you will have a new interface in the router of G2/0 (or something like that). That is the interface that ties the router to the etherswitch module. That would be your inside interface for NAT. That should give you somewhere to start. If not, please post the config of the router and etherswitch module. They are separate devices with their own unique config.

I would make all the ports in the etherswitch static access ports (switchport mode access + switchport nonegotiate). One thing that leaps out at me is the default router is wrong in your dhcp pool. You have

default-router 192.168.0.1

Shouldn't that be

default-router 192.168.1.1

 

Ok, I fixed the default router to 192.168.1.1,

but the switchport mode I'm not familiar with. If you could, please walk me through that. 


@Goatster wrote:

Ok, I fixed the default router to 192.168.1.1,

but the switchport mode I'm not familiar with. If you could, please walk me through that. 


on each interface in the etherswitch module, you would put the commands I listed.

switchport mode access
switchport nonegotiate

I saw the configs in the earlier post. I don't know why they aren't there now.

ok, all fast/e 0/2-15 are now switchport mode access/nonegotiate.

 

Anything else I should address?

See if it works now. You DHCP client in VLAN 1 will have to release and renew to get the new gateway.

I reloaded the router/switch, reset cable modem, still can't ping outside the router from the switch. 

 

 

!
! Last configuration change at 22:11:24 UTC Sun Jun 26 2022
! NVRAM config last updated at 22:11:27 UTC Sun Jun 26 2022
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname CISCO_SWITCH
!
boot-start-marker
boot-end-marker
!
!
!
!
no aaa new-model
system mtu routing 1500
authentication mac-move permit
ip subnet-zero
ip dhcp excluded-address 192.168.1.1 192.168.1.10
!
ip dhcp pool SNMPOOL
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
!
!
!
!
crypto pki trustpoint TP-self-signed-3443242112
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-3443242112
revocation-check none
rsakeypair TP-self-signed-3443242112
!
!
crypto pki certificate chain TP-self-signed-3443242112
certificate self-signed 01 nvram:IOS-Self-Sig#3232.cer
!
!
!
spanning-tree mode pvst
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
interface FastEthernet0/2
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/3
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/4
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/5
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/6
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/7
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/8
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/9
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/10
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/11
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/12
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/13
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/14
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/15
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/16
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet0/1
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet0/17
!
interface GigabitEthernet0/18
!
interface Vlan1
ip address 192.168.1.5 255.255.255.0
no ip route-cache
!
ip http server
ip http secure-server
ip sla enable reaction-alerts
!
line con 0
speed 115200
flowcontrol software
line vty 0 4
login
line vty 5 15
login
!
end

My posts are still getting deleted, again!

 

Reset cable modem, router, still no ping to 8.8.8.8 from switch. But router can ping 8.8.8.8

 

I would post my conf again, but that will probably get deleted, again. 

 

Goatster
Spotlight
Spotlight

On another note, why are my show config posts getting deleted?

Hi

 This config is wrong:

 

ip dhcp excluded-address 192.168.1.1 192.168.1.10
!
ip dhcp pool SNMPOOL
network 192.168.1.0 255.255.255.0
default-router 192.168.0.1
dns-server 8.8.8.8

 

If you are assigning IP address on the 192.168.1.0 network, you gateway also must be on the same network. So, you default-router needs to be 192.168.1.1

 

If you want those devices connected to the switch to access the internet, you need add NAT on the router.

 

In the router, On the interface with DHCP you need to add:

ip nat outside

 

On the interface or vlan to the switch you need to add "ip nat inside"

 

Then, you need to add an access-list

ip access-list standard 1 permit 192.168.1.0

 

And the NAT statement

ip nat inside source list 1 interface "dhcp interface" overload

Please excuse the mess. The post you replied to was my original post that was flagged for spam. I created another one(this current one). So here we are after all settings are fixed. 

 

Still no ping to 8.8.8.8 from switch-router. 

I can still ping 8.8.8.8 from the router.

I am a bit confused about what is going on. There are mentions of multiple posts with configs but I see only a single config, which seems to be the config of the switch. Is that correct?

In that config the dhcp scope indicates that the default gateway is 192.168.1.1. I assumed that this would be the address of the interface vlan 1. But this is what the config shows for the vlan interface

ip address 192.168.1.5 255.255.255.0

So where is 192.168.1.1?

And where is the config of the router?

HTH

Rick

Oh, its def a mess in here. For some reason, 5 mins after I post a config, the post disappears. Then I had to repost it again, only for it to disappear again. Either a mod is getting trippy with his delete button, or my config posts are getting flagged for spam. 

 

192.168.1.1 is configured to gigabitethernet1/0 of the switch. 

 

When I get back later today, I will repost a current running copy of the config of both the router and switch. 

Goatster
Spotlight
Spotlight

Thank you Leo for merging my posts.

 

If there is a section on proper posting guidelines, I'd love to see it. 

Review Cisco Networking for a $25 gift card