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.
I do have a desktop PC in my office and it is connected to LAN via ethernet(say eth0). What I do wanna do is connecting another ethernet card(say eth1) to that desktop PC and connect my laptop to network over that PC.
When I connected second ethernet card my connection has gone somehow.
when I run "lspci" command I can see both of my ethernet cards and when I run "ifconfig" I see that there is no change on my network adjustments for eth0 but my connection is somehow gone. I tested it simply by running "ping" command.
Furthermore I tried to add net by "route" command for "dev eth1" by
"route add -net 192.168.99.0 netmask 255.255.255.0 dev eth1"
but It gives an error as "SIOCADDRT: No such device"
Now my LAN ip for eth1 is something like 193. .... .101
now when I just make "ifconfig eth1 192.168.1.1 up" my connection goes off...
I tried giving the same ip to eth1 (namely the one starting with 193. ... )as well, then I could connect to intranet but not internet.
I guess this problem is caused by the fact that I use two ethernet cards with the same chipset...
I wrote something wrong as a result you misunderstood, sorry for that...
Now my LAN ip for eth0 (not 1) is something like 193. .... .101 (this ip is the one I sholu have for my connection to LAN)
now when I just make "ifconfig eth1 192.168.1.1 up" my connection (the one related to eth0 ) goes off...
What I wanna do is that giving 192.168.1.1 to the eth1 on my desktop pc and giving my laptop 192.168.1.2 and then connecting to internet via my desktop pc. ...
I guess this problem is caused by the fact that I use two ethernet cards with the same chipset...
If you are connecting the internet ip on the eth0, it should not be a LAN ip.
If you are on a dhcp ( dsl connection) then the ethernet end provided by your ISP will bring up whatever ip your eth0 needs to have.
You just need to bring up a local ip on the eth1 then. After this you can setup the forwarding on eth1 as we discussed earlier.
If you have a problem identifying eth0 and eth1, please get a pic of your desktop pc's (backside of the cabinet.) and your connection.
We should be able to figure something out
Also, may be you should try the network setup command specific to slackware.
redhat has this command called 'setup' that helps you to configure network configuration.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.