Howto make dhcp work with vlan tagging on slackware?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Howto make dhcp work with vlan tagging on slackware?
Hi
I have followed a great guide on VLAN tagging on slackware and made it work
with static ip adress behind a router that can handle VLAN tagging.
DHCP server is also activated for that VLAN. But slackware does not get an valid adress from router, only 169.x.x.x adress. That is why I put a static ip instead in script below.
However it would be nice to configure it for dhcp in file /etc/rc.d/rc.inet1.conf instead of static ip on slackware
Is there a way to do this on slackware for a tagged VLAN?
Here is a script I put in /etc/rc.d/rc.local on slackware 13.37
You could add the interface name in rc.inet1.conf:
IFNAME[1]="eth0.10"
USE_DHCP[1]="yes"
...
The vconfig command still needs to be run before rc.inet1 is executed. Fortunately, the Slackware startup scripts check for the existence of /etc/rc.d/rc.netdevice and, if the file exists and is executable, runs it prior to calling rc.inet1.
Historically, this script was used to load non-PnP drivers for ISA NICs. In a perfect world, Slackware would have VLAN support in rc.inet1/rc.inet1.conf, but this is an acceptable workaround IMHO. Create /etc/rc.d/rc.netdevice:
thank you
I have tried it "ifconfig eth0 up" but it did not work either
ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1E:EC:68:80:A2
inet addr:169.254.33.56 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::21e:ecff:fe68:80a2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:210 errors:0 dropped:0 overruns:0 frame:0
TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20672 (20.1 Kb) TX bytes:28516 (27.8 Kb)
dmesg |grep eth0
[ 6.393374] e100 0000:02:08.0: eth0: addr 0xf0101000, irq 20, MAC addr 00:1e:ec:68:80:a2
[ 41.040158] e100 0000:02:08.0: eth0: NIC Link is Up 100 Mbps Full Duplex
[ 41.040415] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 41.040598] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 43.234161] e100 0000:02:08.0: eth0: NIC Link is Up 100 Mbps Full Duplex
[ 43.234422] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 43.234604] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 43.262159] e100 0000:02:08.0: eth0: NIC Link is Up 100 Mbps Full Duplex
[ 43.262415] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 43.262597] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 54.098041] eth0: no IPv6 routers present
[ 229.410035] eth0.10: no IPv6 routers present
According to dmesg, the link went up and down several times during the boot process. Unless you physically unplugged and re-inserted the network cable or power cycled the switch/router, this might indicate a layer 1 (physical) problem.
The output from ifconfig says that all links are now up. Have you tried running dhcpcd eth0.10 from the command line? You might want to run tcpdump -i eth0.10 udp port 67 at another console first, to see if the dhcp server responds at all.
The -i parameter to tcpdump specifies the interface, which in this case is eth0.10. Putting another parameter between -i and the interface name won't work.
It doesn't really matter though, if you've already confirmed that you can indeed get an IP address via DHCP. The problem has to be related to one of the scripts.
You could try inserting a debug statement or two into rc.netdevice and/or rc.inet1 and see what happens at boot. For instance, ifconfig -a at the end of rc.netdevice could be helpful in determining the cause of the problem.
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for VLAN interface eth0.10:
IFNAME[0]="eth0.10"
USE_DHCP[0]="yes"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.