FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-06-2010, 12:48 PM
Hakan Koseoglu
 
Default Addressing outgoing connections to a specific interface

Dotan,
On 6 November 2010 13:04, Dotan Cohen <dotancohen@gmail.com> wrote:
> Although I need to stay connected to the wireless router, can I still
> access the address 192.168.0.1 on the wired interface? Some googling
> led me to the keyword "loopback" but I am at a loss as how to
> configure it, or if this is even the right idea. If there is a
> specific page that I should be reading in the fine manual then please
> do RTFM me, as I myself failed to find the proper page.
I think I need to drink more coffee because I'm failing to understand
what you're trying to achieve.

If wlan and eth0 are connected to the same network with different IPs
and you want to use the eth0's IP address on wlan0 when eth0 is not
connected, you use ifconfig with wlan0:1 notation to assign eth0's IP
to wlan0:1.

If you want to access from your LAN network to your WiFi network, you
need to set up one of the following,
a) a bridge (assuming you want to join your WLAN and LAN networks)
b) a masquerading setup
c) plain old routing between two networks

All of them should work but behave slightly differently.
Bridge is useful when you want to join two networks, masquerade is OK
if you don't want to access from WiFi network to your LAN network,
otherwise you will have to set up port forwardings, if you chose to
route in between, then your WiFi router need to be aware of your LAN
and have your laptop in between as a gateway to route the correct
packages.
--
Hakan (m1fcj) - http://www.hititgunesi.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 12:52 PM
Hakan Koseoglu
 
Default Addressing outgoing connections to a specific interface

On 6 November 2010 13:04, Dotan Cohen <dotancohen@gmail.com> wrote:
> Although I need to stay connected to the wireless router, can I still
> access the address 192.168.0.1 on the wired interface? Some googling
> led me to the keyword "loopback" but I am at a loss as how to
> configure it, or if this is even the right idea. If there is a
> specific page that I should be reading in the fine manual then please
> do RTFM me, as I myself failed to find the proper page.
(re-reading what you wrote) I think I now get it.

You want to use both network cards at the same time. Yes, it's doable.
The easiest method would be bonding.

--
Hakan (m1fcj) - http://www.hititgunesi.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 01:10 PM
Dotan Cohen
 
Default Addressing outgoing connections to a specific interface

On Sat, Nov 6, 2010 at 15:52, Hakan Koseoglu <hakan@koseoglu.org> wrote:
> You want to use both network cards at the same time. Yes, it's doable.
> The easiest method would be bonding.
>

Yes, both cards at the same time. They are on different networks: eth0
is connected to an internet-less LAN, and wlan0 is connected to a
router that connects it with the internet. Both networks have devices
on 192.168.0.1 and I need to access (via port 80 in a web browser)
both those devices at the same time.


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 01:13 PM
Dotan Cohen
 
Default Addressing outgoing connections to a specific interface

It seems that bonding is "aggregating multiple ethernet channels
together to form a single channel", not quite what I am looking for.

To be more specific: I am connected to the internet via wlan0. When I
type 192.168.0.1 into my web browser, I get the web control panel of
the Linksys router that manages that wireless network. However, at the
moment I need to access the web control panel of the D-Link router
that manages my eth0 LAN, also on 192.168.0.1 but on the eth0
interface. How can this be done?


Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 01:29 PM
Markus Falb
 
Default Addressing outgoing connections to a specific interface

On 06.11.10 15:13, Dotan Cohen wrote:

> To be more specific: I am connected to the internet via wlan0. When I
> type 192.168.0.1 into my web browser, I get the web control panel of
> the Linksys router that manages that wireless network. However, at the
> moment I need to access the web control panel of the D-Link router
> that manages my eth0 LAN, also on 192.168.0.1 but on the eth0
> interface. How can this be done?

Set a temporary additional route
#$ ip ro add 192.168.0.1/32 dev eth0

You can get rid of it again with
#$ ip ro del 192.168.0.1

However, maybe you really should get rid of such "doubled" adresses or
networks.

--
Best Regards,
Markus Falb

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 03:11 PM
Dotan Cohen
 
Default Addressing outgoing connections to a specific interface

On Sat, Nov 6, 2010 at 16:29, Markus Falb <markus.falb@fasel.at> wrote:
> Set a temporary additional route
> #$ ip ro add 192.168.0.1/32 dev eth0
>
> You can get rid of it again with
> #$ ip ro del 192.168.0.1
>

Thanks, that is what I need to know! I should be able to google it from here.


> However, maybe you really should get rid of such "doubled" adresses or
> networks.
>

Neither side is willing to bugde, it's my own doing really and it's in
a learning environment, not a business environment, so I learn what I
can from it! CentOS seems to be very flexible and configurable, doubly
so regarding anything to do with a network, and this is a great way to
learn about both the OS and networks in general.


--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 04:10 PM
John R Pierce
 
Default Addressing outgoing connections to a specific interface

On 11/06/10 7:29 AM, Markus Falb wrote:
> On 06.11.10 15:13, Dotan Cohen wrote:
>
>> To be more specific: I am connected to the internet via wlan0. When I
>> type 192.168.0.1 into my web browser, I get the web control panel of
>> the Linksys router that manages that wireless network. However, at the
>> moment I need to access the web control panel of the D-Link router
>> that manages my eth0 LAN, also on 192.168.0.1 but on the eth0
>> interface. How can this be done?
> Set a temporary additional route
> #$ ip ro add 192.168.0.1/32 dev eth0
>
> You can get rid of it again with
> #$ ip ro del 192.168.0.1

that temporary route will break his internet access, since 192.168.0.1
is ALSO his internet gateway on the W-LAN side.

there's no way around this. if you can readdress one or the other LAN,
then this would just work all the time.




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 04:29 PM
Dotan Cohen
 
Default Addressing outgoing connections to a specific interface

On Sat, Nov 6, 2010 at 19:10, John R Pierce <pierce@hogranch.com> wrote:
> that temporary route will break his internet access, since 192.168.0.1
> is ALSO his internet gateway on the W-LAN side.
>
> there's no way around this. if you can readdress one or the other LAN,
> then this would just work all the time.
>

This is on the Internet-connected interface:
wlan0 Link encap:Ethernet HWaddr 00:18:de:98:c7:34
inet addr:192.168.0.26 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::218:deff:fe98:c734/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:114879 errors:0 dropped:0 overruns:0 frame:0
TX packets:78945 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:104017653 (104.0 MB) TX bytes:11292782 (11.2 MB)


And this is on the LAN-connected interface:
eth0 Link encap:Ethernet HWaddr 00:15:c5:c8:13:d1
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::215:c5ff:fec8:13d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1921474 errors:0 dropped:0 overruns:0 frame:0
TX packets:8322288 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:146445850 (146.4 MB) TX bytes:3479224403 (3.4 GB)
Interrupt:17

I'm not booted into CentOS at the moment (I just rebooted to Ubuntu
because my Thunderbird mail is there) but I can reboot if there is any
other info that might be relevant. I'm really surprised that it is
this difficult (I don't yet believe impossible!) and just assumed that
I'm doing things wrong. As the saying goes, if in Linux it is getting
difficult, then you are probably doing it wrong! Surely I am not the
first person who is connected to two separate LANs and needs to access
addresses on both of them.

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 04:35 PM
Hakan Koseoglu
 
Default Addressing outgoing connections to a specific interface

On 6 November 2010 14:13, Dotan Cohen <dotancohen@gmail.com> wrote:
> To be more specific: I am connected to the internet via wlan0. When I
> type 192.168.0.1 into my web browser, I get the web control panel of
> the Linksys router that manages that wireless network. However, at the
> moment I need to access the web control panel of the D-Link router
> that manages my eth0 LAN, also on 192.168.0.1 but on the eth0
> interface. How can this be done?
OK, I got it wrong earlier. Not possible without breaking your WLan network.
It's much easier to move the D-Link router to 192.168.0.2 or something
else, in most cases it doesn't matter where the router sits. Better,
move one of them to an other private network subnet (192.168.1.0/24
maybe?)

--
Hakan (m1fcj) - http://www.hititgunesi.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-06-2010, 05:05 PM
KevinO
 
Default Addressing outgoing connections to a specific interface

On 11/06/2010 10:29 AM, Dotan Cohen wrote:
>Surely I am not the
> first person who is connected to two separate LANs and needs to access
> addresses on both of them.
>
No. You're just one of the first to want to do it with both sub-nets set up with
THE SAME NETWORK ADDRESS.

Move one. Both are adjustable.
--
KevinO
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:08 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org