You are not logged in.
Hello Sirs,
I would like to describe my problem. For my internet connection im using adsl+ and have a router. Router somehow is configured for 2 wan interfaces: 8.35 (vpi/vci) for internet, another 8.36 (vpi/vci) for iptv. With router everything works ok, but it isn't very good. I have poor wifi and some other problems. So I would like to use that router only as a bridge and to make server for routing and separate access point. Problem is that, that I have to use dhcpcd for connection to network and somehow it is always getting iptv's IP (8.36 interface), I can see tv, but no internet connection. Was trying same thing in windows, there is everything works ok. Its getting right IP and TV works too.
So Sirs, could you give me an advice please how I could make dhcpcd connect exactly to 8.35 wan interface? I was playing with wicd-client and noticed that it randomly gets sometimes right IP sometimes TV's ip. dhcpcd -d eth0 always only 8.36 ![]()
Hope you could help me to solve this weird thing.
Thanks in advance!
Offline
What is the modem\routers model you are using? also how many Ethernet interfaces do you have in the computer?
Offline
Hello nocain,
Im using D'link 2500U external modem. It is connected to ethernet card.
And there is only 3 interfaces: eth0, wlan0 and lo.
Offline
This is a bit odd scenario so it is hard for me to understand how this is working... are you sure you have it bridged right? eg. through dhcp you are getting some form of ip like 71.110.0.91 or 71.110.0.92, but without bridge enabled you get something along the lines of 192.168.1.2 or 192.168.2.2
I think I am still confused on what you are trying to accomplish. You have a 2500U with 2 wan interfaces(Vpi 8.35 = internet, Vpi 8.36 = iptv ) , then you are running the cable from the 2500U's lan port directly to the computers Ethernet port. Once at that point you want to have the Vpi 8.36(iptv) stay at your server but Vpi 8.35(internet) you want forwarded to wlan0 and use NAT and dhcp to distribute it out to wireless devices... Now the problem is that you need to split out this traffic on the server end, so you need to apply Mac filtering on the router side for the Vci's, which means you have to use Vlan's on the server as you only have 1 ethernet interface...
This is just a guess as I have never tried this nor can I really replicate it easily to test and I am not familiar with your router.
1.) In router add a mac filter rule to 8.35 to block mac 00:00:00:00:00:02
2.) In router add a mac filter rule to 8.36 to block mac 00:00:00:00:00:01
3.) on server issue the command as root "ip link add link eth0 name eth0.1 type vlan id 1 address 00:00:00:00:00:01"
4.) on server issue the command as root "ip link add link eth0 name eth0.2 type vlan id 2 address 00:00:00:00:00:02"
now you should have interfaces lo, wlan0, eth0, eth0.1, eth0.2 when using ifconfig if not an ifconfig eth0.1 up and ifconfig eth0.2 up should make them show... now eth0.1 should only get the internet ip and eth0.2 should only get the iptv ip. now I have never done this using iproute2 as last time I played with doing this vconfig was what was used but I guess it has been deprecated... so if that no work they for steps 3 and 4 the command may need to look more like this... "ip link add link eth0 address 00:00:00:00:00:01 eth0.1 type macvlan" and ip link add link eth0 address 00:00:00:00:00:02 eth0.2 type macvlan"
also these setting will not persist when the computer is rebooted to get everything set at boot you will need to look into this... https://wiki.archlinux.org/index.php/VLAN_101
I am assuming since you didn't ask, that you know how to get dhcpd set up and get iptables sending the data from eth0.1 out to wan0...
good luck and hope this helps some ![]()
Offline
Hello Sir nocain,
sorry for late reply, I was away last days and checked these configurations only today.
Thank you very much for your help. Everything works almost perfect now ![]()
With eth0 Im getting exactly that ip, which I need. Mac filter is very nice tool ![]()
Only problem for now is that vlan isnt working I guess (it dont work neither with router neither with dlink modem).
This is connection with router:
[tomka@Tomas ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1D:60:BC:73:92
inet addr:192.168.1.96 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21d:60ff:febc:7392/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3939 errors:0 dropped:0 overruns:0 frame:0
TX packets:4159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2187564 (2.0 Mb) TX bytes:715901 (699.1 Kb)
Interrupt:20 Base address:0xa400
eth0.1 Link encap:Ethernet HWaddr 00:02:9B:22:1D:A5
inet6 addr: fe80::202:9bff:fe22:1da5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:5289 (5.1 Kb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:464 errors:0 dropped:0 overruns:0 frame:0
TX packets:464 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34736 (33.9 Kb) TX bytes:34736 (33.9 Kb)
[tomka@Tomas ~]$ sudo dhcpcd -d eth0.1
Password:
dhcpcd[1823]: version 5.2.10 starting
dhcpcd[1823]: eth0.1: using hwaddr 00:02:9b:22:1d:a5
dhcpcd[1823]: eth0.1: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[1823]: eth0.1: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[1823]: eth0.1: broadcasting for a lease
dhcpcd[1823]: eth0.1: sending DISCOVER (xid 0xa46a5d97), next in 3.96 seconds
dhcpcd[1823]: eth0.1: sending DISCOVER (xid 0xa46a5d97), next in 8.61 seconds
dhcpcd[1823]: eth0.1: sending DISCOVER (xid 0xa46a5d97), next in 15.55 seconds
dhcpcd[1823]: eth0.1: sending DISCOVER (xid 0xa46a5d97), next in 31.97 seconds
dhcpcd[1823]: timed out
[tomka@Tomas ~]$ sudo dhcpcd -d eth0
dhcpcd[1838]: dhcpcd already running on pid 1704 (/var/run/dhcpcd-eth0.pid)
[tomka@Tomas ~]$ sudo killall dhcpcd
[tomka@Tomas ~]$ sudo dhcpcd -d eth0
dhcpcd[1849]: version 5.2.10 starting
dhcpcd[1849]: eth0: using hwaddr 00:1d:60:bc:73:92
dhcpcd[1849]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[1849]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[1849]: eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
dhcpcd[1849]: eth0: rebinding lease of 192.168.1.96
dhcpcd[1849]: eth0: sending REQUEST (xid 0x8c0b5874), next in 3.50 seconds
dhcpcd[1849]: eth0: acknowledged 192.168.1.96 from 192.168.1.254
dhcpcd[1849]: eth0: checking for 192.168.1.96
dhcpcd[1849]: eth0: sending ARP probe (1 of 3), next in 1.15 seconds
dhcpcd[1849]: eth0: sending ARP probe (2 of 3), next in 1.98 seconds
dhcpcd[1849]: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[1849]: eth0: leased 192.168.1.96 for 3600 seconds
dhcpcd[1849]: eth0: adding IP address 192.168.1.96/24
dhcpcd[1849]: eth0: adding route to 192.168.1.0/24
dhcpcd[1849]: eth0: adding default route via 192.168.1.254
dhcpcd[1849]: eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
dhcpcd[1849]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd[1849]: forking to background
dhcpcd[1849]: forked to background, child pid 1870
[tomka@Tomas ~]$ I have checked eth0.1 with wireshark, there aren't any incoming packages..
Thanks in advace Sirs!
Offline
Well a couple of things I ran across looking into this as I find it rather interesting( I always like new stuff to learn )
1. It looks like iptv uses multicast which makes things a bit more complex, it is also probably why you have general poor performance as your network is essentially being flooded... so you need to setup igmpproxy which you can grab from AUR
2. you are using your eth0 in place of one of the Vlans, which I don't know if this would work in your scenario as you need eth0 as your trunking interface for the 2 Vlans
3. dhcpcd may not be able to support this configuration, at least at it was not capable don't know if it is now... but in the least you can use dhclient to get things working if this is the case
I don't think I can help much more as I don't really have a way of mimicking this to do some quick tests, but I can point you to some interesting links I dug up this morning which may be useful to you and if nothing else you may be able to contact some of the people in the links that have a better understanding of what you are trying to do to get help.
if\when you do get it solved I would be interested in an update to this post so I can see what the solution was.
Useful links:
http://plasmahh.projectiwear.org/t_home.html
http://www.robmir.nl/robert/?s=iptv&x=0&y=0
http://forums.whirlpool.net.au/archive/932087
http://www.linuxforums.org/forum/networ … uting.html
Offline