Community discussions

 
qewqew
just joined
Topic Author
Posts: 8
Joined: Mon May 28, 2018 5:58 pm

Switch can't get IP address

Thu Sep 27, 2018 10:55 am

Hello.
I'm trying to get my CRS125, configured as an access switch that receives VLANs and have them assigned for different ports, to be able to get IP address by DHCP.
/interface bridge
add name=bridge1 protocol-mode=none

/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether3
#...other ports 4-12
add bridge=bridge1 interface=ether12

/interface ethernet switch egress-vlan-tag
add tagged-ports=ether1 vlan-id=10
add tagged-ports=ether1 vlan-id=11

/interface ethernet switch ingress-vlan-translation
add customer-vid=0 new-customer-vid=10 ports=ether3,ether4
add customer-vid=0 new-customer-vid=11 ports=\
    ether5,ether6,ether7,ether8,ether9,ether10,ether11,ether12

/interface ethernet switch vlan
add ports=ether1,ether3,ether4 vlan-id=10
add ports=ether1,ether5,ether6,ether7,ether8,ether9,ether10,ether11,ether12 \
    vlan-id=11

/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=bridge1
ATM switch works as intended:
  • port 1 is connected to trunk port on core switch
  • ports 3-4 serves as access ports for VLAN 10 which lacks of DHCP server and all of the precious IPs are set manually
  • ports 5-12 are access for VLAN 11 and all connected devices receives network settings via DHCP
  • port 2 is not added to bridge, because i have already locked myself out the device and it is just a precautionary measure :3
But for some reason switch can't get an IP and can't connect to this switch from any port besides port 2!
When i added VLAN 11 to port 1 (/interface vlan add interface ether1 name vlan11 vlan-id=11) i noticed that my router log was populated with entries:
dhcp offering lease aaa.bbb.ccc.ddd for MAC-of-access-switch without success
I think i missed something crucial.
 
User avatar
xvo
Long time Member
Long time Member
Posts: 598
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Switch can't get IP address

Thu Sep 27, 2018 12:25 pm

First of all you need to add switch cpu as a member of vlan on which you want to get an address (vlan-id=11, i guess).
And also you may also need to move vlan11 interface from ether1 to bridge1.
 
qewqew
just joined
Topic Author
Posts: 8
Joined: Mon May 28, 2018 5:58 pm

Re: Switch can't get IP address

Thu Sep 27, 2018 1:07 pm

First of all you need to add switch cpu as a member of vlan on which you want to get an address (vlan-id=11, i guess).
And also you may also need to move vlan11 interface from ether1 to bridge1.
Thanks for your suggestion xvo. Added switch-cpu to VLAN 11, moved VLAN interface to bridge and set DHCP client to work on VLAN interface, still same warnings on router with switch's MAC.
 
qewqew
just joined
Topic Author
Posts: 8
Joined: Mon May 28, 2018 5:58 pm

Re: Switch can't get IP address

Thu Sep 27, 2018 2:25 pm

I've checked debug logs on router:
dhcp,debug,packet sw-tst_MAC: dhcp3 received discover with id 3537134035 from 0.0.0.0 
dhcp,debug,packet sw-tst_MAC:     secs = 40 
dhcp,debug,packet sw-tst_MAC:     flags = broadcast 
dhcp,debug,packet sw-tst_MAC:     ciaddr = 0.0.0.0 
dhcp,debug,packet sw-tst_MAC:     chaddr = sw-tst_MAC 
dhcp,debug,packet sw-tst_MAC:     Msg-Type = discover 
dhcp,debug,packet sw-tst_MAC:     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
dhcp,debug,packet sw-tst_MAC:     Host-Name = "sw-tst" 
dhcp,debug,packet sw-tst_MAC:     Client-Id = sw-tst_MAC 
dhcp,debug,packet sw-tst_MAC: dhcp3 sending offer with id 3537134035 to 255.255.255.255 
dhcp,debug,packet sw-tst_MAC:     flags = broadcast 
dhcp,debug,packet sw-tst_MAC:     ciaddr = 0.0.0.0 
dhcp,debug,packet sw-tst_MAC:     yiaddr = 192.168.11.61 
dhcp,debug,packet sw-tst_MAC:     siaddr = 192.168.11.1 
dhcp,debug,packet sw-tst_MAC:     chaddr = sw-tst_MAC 
dhcp,debug,packet sw-tst_MAC:     Msg-Type = offer 
dhcp,debug,packet sw-tst_MAC:     Server-Id = 192.168.11.1 
dhcp,debug,packet sw-tst_MAC:     Address-Time = 7200 
dhcp,debug,packet sw-tst_MAC:     Subnet-Mask = 255.255.255.0 
dhcp,debug,packet sw-tst_MAC:     Router = 192.168.11.1 
dhcp,debug,packet sw-tst_MAC:     Domain-Server = 192.168.50.50,192.168.50.51 
dhcp,debug,packet sw-tst_MAC: dhcp3 received discover with id 3537134035 from 0.0.0.0 
dhcp,debug,packet sw-tst_MAC:     secs = 45 
dhcp,debug,packet sw-tst_MAC:     flags = broadcast 
dhcp,debug,packet sw-tst_MAC:     ciaddr = 0.0.0.0 
dhcp,debug,packet sw-tst_MAC:     chaddr = sw-tst_MAC 
dhcp,debug,packet sw-tst_MAC:     Msg-Type = discover 
dhcp,debug,packet sw-tst_MAC:     Parameter-List = Subnet-Mask,Classless-Route,Router,Static-Route,Domain-Server,NTP-Server,CAPWAP-Server,Vendor-Specific 
dhcp,debug,packet sw-tst_MAC:     Host-Name = "sw-tst" 
dhcp,debug,packet sw-tst_MAC:     Client-Id = sw-tst_MAC 
dhcp,warning dhcp3 offering lease 192.168.11.61 for sw-tst_MAC without success
 
User avatar
xvo
Long time Member
Long time Member
Posts: 598
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Switch can't get IP address  [SOLVED]

Thu Sep 27, 2018 3:01 pm

Have you added cpu to /interface ethernet switch ingress-vlan-translation as well?
 
qewqew
just joined
Topic Author
Posts: 8
Joined: Mon May 28, 2018 5:58 pm

Re: Switch can't get IP address

Thu Sep 27, 2018 4:03 pm

Have you added cpu to /interface ethernet switch ingress-vlan-translation as well?
That did the job, much obliged! Tried to find info about WHY do it work that way, unfortunately there are none. Could you elaborate please, why did that setting resolve the issue?
 
mkx
Forum Guru
Forum Guru
Posts: 3195
Joined: Thu Mar 03, 2016 10:23 pm

Re: Switch can't get IP address

Thu Sep 27, 2018 4:19 pm

RB's CPU is yet another port on switch chip. As your management connections are actually answered by services running on CPU, you need to explicitly configure all needed (VLANs, ...) for that as well.
BR,
Metod
 
User avatar
xvo
Long time Member
Long time Member
Posts: 598
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Switch can't get IP address

Thu Sep 27, 2018 4:29 pm

The reason is the response for DHCP offer never got back to the router, because it was not tagged with the proper vlan tag by the switch.

Who is online

Users browsing this forum: MSN [Bot] and 115 guests