View previous topic :: View next topic |
Author |
Message |
exabyte n00b
Joined: 08 Feb 2008 Posts: 5 Location: Bulgaria
|
Posted: Sun Nov 02, 2008 1:29 am Post subject: Same IP, multiple interfaces, how? |
|
|
My Gentoo broke. It seems that after some update I did in the last few months, it refuses to put the same IP on an interface, if another interface has it already. One of the interfaces is ethernet with netplug and dhcp, the other is a wireless LAN with wpa_supplicant and static configuration for the AP I'm connecting to. How to fix this misfeature? It's driving me fucking insane, I can no longer switch between wireless and cable by connecting/disconnecting my cable. |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Sun Nov 02, 2008 3:17 pm Post subject: |
|
|
Assinging the same IP address to two distinct interfaces is a mistake. I wonder why you could before but it's something that must be avoided.
Gentoo baselayout is flexible enough to allow you different settings according to various situations. You can have a fixed IP when connecting to your AP and yet a dynamic IP assigned from DHCP through Ethernet cable. Example:
Code: | config_myownessid=( "192.168.1.10/24" )
routes_myownessid=( "192.168.1.1" )
dns_servers_myownessid=( "192.168.0.1" "192.168.0.2" )
dns_domain_myownessid="some.domain"
dns_search_myownessid="search.this.domain search.that.domain" |
The rest is set through DHCP if no setting exists.
Check /etc/conf.d/net.example for what you need exactly. Post here if you need further helping.
BTW what version of baselayout are you using? Did you install OpenRC? _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
exabyte n00b
Joined: 08 Feb 2008 Posts: 5 Location: Bulgaria
|
Posted: Sun Nov 02, 2008 6:50 pm Post subject: |
|
|
Thank for the reply.
Assigning the same IP to two distinct interfaces might be a mistake in theory (though I doubt it), but can be very useful and there are configurations that can't be achieved without using so. The cases where I've been using it include two interfaces to the same physical network, like I'm trying to do now, proxy arp configurations, especially those between hunreds of interfaces, etc.
I want to achieve this - put my cable, my packets automagically begin going through the cable, pull my cable, my packets automagically begin going through my wireless. It was exactly like this (with absolutely no delay on connecting the a cable, and a minor on disconnecting it, and no connections dropped) until I got bitten by this change, which apparently blocks the interfaces from starting.
The change must have happened some time during the last year, as I didn't have any real use for this, until I recabled my whole appartment now. Now I have to type my password and fire up a shell everytime I need to change from wireless to cable and vica versa, plus the delay is so big, that some connections get dropped and other get stalled for seconds to minutes. And I've been used to the fact that everything in my Gentoo happened absolutely automatically with no intervention on my part for absolutely *anything*, so I'm very frustrated by this.
The example you gave is exactly how I configured my wireless. The LAN card is using DHCP, plus several static gateway configurations. The DHCP gives me the same IP I have on the LAN card, and I want both to go up in this configuration, with no stupid refusals.
I'm still not using openrc on this machine, though I'm currently upgrading to it. |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Sun Nov 02, 2008 7:06 pm Post subject: |
|
|
You might want to try bonding -- although I've never done that. Bridging between wifi and ethernet would allow you to do what you want but bridging with WiFi is hazardous because of firmware, basically. So bonding is the only way I'm thinking of ATM: two NICs --> one IP. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
exabyte n00b
Joined: 08 Feb 2008 Posts: 5 Location: Bulgaria
|
Posted: Sun Nov 02, 2008 8:01 pm Post subject: |
|
|
I don't think that bonding is supported by my network equipment, if it is supported at all in such configuration. And bonding is certainly not what I want. By the way, I switch from wireless to cable mainly because of the delay. PulseAudio doesn't work in my wireless network because of the delays, you see.
However, I think I found the source of my problem, as it was two mistakes on my part. It's arping that was breaking my wireless, which gets fixed by this:
Code: |
modules_wlan0=( "wpa_supplicant" "!arping" )
|
But I don't need this, because it gets connected first and doesn't complain, and it will cause less problems with arping enabled.
The ethernet was broken by dhcpcd. I fixed it by switching to dhclient. It seems that dhcpcd was changed, because it was what I chose since the beginning, and because it doesn't have some of the options I was using anymore.
Thanks for the input |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Sun Nov 02, 2008 11:18 pm Post subject: |
|
|
dhcpcd has been upgraded to version 4 to fit RFC4702 about DHCP servers -- DNS encoded hostnames deprecates text encoding. You may safely downgrade to version 3*. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|