3

I am having an issue doing a simple VLAN configuration on a D-Link (DGS 1210) switch.

There is port 24 on the D-Link switch which is connected to a Cisco router. Which basically needs to be a Trunk as it will carry several VLANs. The configuration is as follows.

Router#sh run
Building configuration...

Current configuration : 1450 bytes
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
ip cef
no ipv6 cef
multilink bundle-name authenticated
!
cts logging verbose
!
!
license udi pid CISCO1941/K9 sn FCZ193991KJ
!
!
!
redundancy
!
!
interface Embedded-Service-Engine0/0
 no ip address
 shutdown
!
interface GigabitEthernet0/0
 ip address 130.1.70.70 255.255.0.0
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/1.110
 encapsulation dot1Q 110
 ip address 10.1.110.1 255.255.255.0
!
interface GigabitEthernet0/1.120
 encapsulation dot1Q 120
 ip address 10.1.120.1 255.255.255.0
!
interface GigabitEthernet0/1.130
 encapsulation dot1Q 130
 ip address 10.1.130.1 255.255.255.0
 ip nat outside
 ip virtual-reassembly in
!
interface GigabitEthernet0/1.140
 encapsulation dot1Q 140
 ip address 192.168.140.1 255.255.255.0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
!
!
access-list 1 permit any
!
control-plane
!
!
!
line con 0
line aux 0
line 2
 no activation-character
 no exec
 transport preferred none
 transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
 stopbits 1
line vty 0 4
 login
 transport input none
!
scheduler allocate 20000 1000
!
end

Router#

On the D-Link switch I am configuring the 802.1Q Asymmetric VLAN without any success. My configuration is as follows.

enter image description here

Port 2 on the switch is where my PC (configured with the proper IP Address) will be connected. I am however unable to ping the gateway 192.168.140.1

Have I missed anything or is the configuration incorrect?

  • Are you statically configuring your PC, or where do you have DHCP configured (it is not on the router)? The gateway on the PC needs to be configured as 192.168.140.1. Also, VLAN 1 needs to be excluded from port 2 on the switch. Having both VLAN 1 and VLAN 140 untagged on the same switch interface will cause problems. – Ron Maupin Oct 20 '17 at 12:00
  • Hi Ron, thank you for answering. I am using a static IP Address but unable to ping the gateway. Also, I have tried to exclude VLAN 1 from port 2 but sill unable to ping the gateway. – NextGen Engineer Oct 20 '17 at 14:21
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 20:06
2

It looks like the router is correct and your intention is to have various sockets on your switch in the various 100/110/etc LANs; just as if you had four ether interfaces on your router and four switches (plug ge 0/0).

I've no specific knowledge of the D-LINK switch, however:

  • "asymmetric vlan" is probably not what you need: it is for allowing a socket to be a member of several VLANs (very nasty overlapping VLANs). Your router config makes it seems like you're going to want inter-VLAN traffic to go through the router (in the usual way)
  • Watch for PVID (port VLAN ID) of socket 24, which is for deciding what VLAN to detag on a frame leaving a given port. If the switch is detagging 140 out of port 24, and the router is expecting a tagged frame (which it is, from your config), you'll get this

Debugging:

  • See if your pings/anything arrive at the router (debug+term mon)
  • Try it in the other direction, see if anything arrives (ping+tcpdump)

Let us know how you get on

Jonathan.

PS "does packet arrive at router": Ashamed as I am to confess such things in a forum like this, I often debug DHCP packets on the router and send DNS queries at it from Unix command line. (The reason I'm so shameful is that the output is small and you don't have to get your ACL right, and "dig" or similar is extremely widely available without installation)

   R1# debug ip dhcp server packet detail
   R1# term mon

   laptop$ dig -p 67 @192.168.0.1 shameful43.com
   laptop$ dig -p 67 @192.168.0.1 shameful44x.com

   Oct 20 12:37:30.518: DHCPD: discarding stub packet (43 bytes).
   Oct 20 12:37:38.218: DHCPD: discarding stub packet (44 bytes).
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.