Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
When I boot up computer with 2 nics in Windows Xp instead of Ubuntu, then sharing Internet works perfectly. When I boot up in Ubuntu, then I can't even ping from Computer_2 to Computer_1 and vice versa. I believe I have to get these both computers talk before doing any masquerading right? If so, how?
Perhaps you have the modules loaded in the wrong order so that what you believe is eth0 is really eth1? If you plug the internal network cable into the other nic (that currently goes to your cable modem), perhaps the ping works? Then you'd need to change the sequence how the modules load, or re-assign their roles in the network setup. If you need to maintain the status for your windows setup, the modules setting is the right way.
It didn't make any difference when I changed cables between nic's - I still couldn't reach 192.168.0.2. After that I tried swiching my logic configurations of both nic's - eth0 with eth1 configurations and vice versa. Now I couldn't activate my nic with external IP and still could not ping other machine with internal IP. I even tried different combinations of ping -I eth0 192.168.0.2 and ping -I eth1 192.168.0.2.
eth0 Link encap:Ethernet HWaddr 00:08:A1:7D:79:20
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::208:a1ff:fe7d:7920/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:47 dropped:0 overruns:0 carrier:47
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:12 Base address:0xd400
Your internal interface has no TX/RX packets, just carrier errors. Carrier errors can usually be associated with a bad patch cable or even speed/duplex mismatch of the NIC. I would think having the wrong NIC driver loaded could also cause these types of errors.
most probable reasons
1) wrong drivers
2) wrong config files
3) bad cables (which is ruled out since ur Win Xp works on the same machine)
4) bad routing...
So for bad drivers check this...
#>lspci <-- this will give you the pci cards details... figure out your ethernet cards..
#>lsmod <-- this will give you loaded modules... just check if the modules are OK for the probed cards
If not..
find the modules for them under /lib/modules/`uname -r`/kernel/drivers/net...
and if u are lucky u will locate a suitable driver...
so rm the unwanted module by..
#> rmmod 'badmodule'
load the OK module
#> insmod 'okmodule'
try restart the network..
and in case if you have bad config files... read the networking docs
yes...
seems like you nic are proparly installed..
now I think you have bad configs...
check the ifcfg-eth0 and ifcfg-eth1...
also you can check the default route...
ip route list
ip route list
82.147.170.0/24 dev eth1 proto kernel scope link src 82.147.170.110
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.1
default via 82.147.170.1 dev eth1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.