Jump to content

How to install two ethernet cards without X windows system?


Guest KShots
 Share

Recommended Posts

BOOM! I just got the magitronic card working (Figured I'd keep trying that until it became futile or worked before having to shut down).... it worked on the "ne" driver, but apparently ONLY after doing a modprobe! (Got the idea from that last link you gave me). lsmod lists it, and ifconfig lists both eth0 and eth1 now. I think the hardest part has just been dealt with... let me reboot and see if this sticks :). Once again, thanks!

CONGRATULATION :!: :!: :!: :!: :!: G()()d WoRk!

 

Now, the next step: :oops: I need to let it know that it can update its RPMS via the web instead of the CD (I have my internal CD-ROM on the outside of the case on another computer's power supply at the moment :)). I think that means I need to set up eth0 and eth1 to internal network and cable modem, the internal network hopefully running DHCP and the card connected to the cable modem accept an IP from the modem.

Well. .. I would plug in it back to install some packages from the cds. Once everything will be set, you'll be able to remove it safely, remove your keyboard/mouse/screen from the machine and let it work (I love linux this way :P )

 

Also, so that I can keep posting here, I'd need a prog that shares an internet connection... don't know what package that's under at the moment :oops:.
EDIT: OK, upon bootup, both eth0 and eth1 are listed as "FAILED"... but on shutdown, they're listed as "OK". Probably doesn't mean much on shutdown, but the bootup may be problematic... or it simply means that an IP has not been given to it yet? Oh, also, I currently only have one of them plugged in (It's plugged into the ethernet). I think that would cause the other to fail regardless. But the biggest step seems to have been completed!

 

Ok so everything will be easy from now since you have two cards working. Now, I suggest you to put your TWO cards (the eeprom and ne) in the box as well as the CDROM (will be easier) and reboot. This is normal you get a [FAILED] for the ethernel cards since we didn't configure anything yet. They are only recognized .. not configure. So, assuming you put the TWO cards AND the CDROM in (just put it in to install some packages from the cds - remove it after), follow those steps.

 

1) Put your two ethernet cards, cdrom and your modem (cable or dsl .. don't remember) to the computer .

 

2) Boot

 

3) At the console, type lsmod and look if ne and eeprom are there (just to be sure those modules are loaded). Take a look at ifconfig also, you should see eth0, eth1 and lo but no IP assigned to them (exept lo=127.0.0.1). This is normal since we didn't configure anything yet.

 

4) type drakconf and select Internet & Network. You'll be faced to three options. Select Configure the connection (something like that) and configure your network. Notice that this will allow you to access the web from that box and assign IP to the two cards. This will however not enable internet connection sharing (next step). The wizard should prompt you for cds (1, 2 or 3) because it will install softwares.

 

5) Check if the net is working. Try to ping google (216.239.39.99) or try to access it with a nice text browser :wink: . Type lynx www.google.ca. If that browser isn't installed, type urpmi lynx to install it. I guess you'll have to play a bit between step 4 and 5 before it works. Make sure the modules are loaded !!

 

6) Enable ICS (internet connection sharing) by typing drakconf and select Connection Sharing. Follow the instructions. The wizard should prompt your for cds (1, 2 or 3) again because a DHCP server is needed as well as a Firewall (Shorewall) for this to work.

 

7) Plug another box to the remaining ethernet card and try to access the net. Notice that this box needs to be set so that it receives an IP via a DHCP server (Your Linux box).

 

Well, lemme know..

 

MOttS

Link to comment
Share on other sites

  • Replies 49
  • Created
  • Last Reply

Top Posters In This Topic

Guest KShots

Well... it's close, but still a no go :(

 

While trying to install the internet/network connection thru drakconf, it was partway through installing DHCP-client and DHCP-common when I got a kernel panic (ouch). This made me reboot, but everything seemed to be responding as I'd expect it to... eth0 grew into eth0:9 with an IP address from the cable modem, and eth1 was set to 192.168.0.1. Sounds good after such a thing, right? Except I can't ping anywhere or use lynx on anything. I think maybe the DHCP install was screwed up. Any way to re-do that? (It doesn't retry to install anymore, just does stuff from the hard drives). Also, I found that Mandrake doesn't seem to know that CD's 2 and 3 even exist (Tried to install DHCP-server via drakconf and it couldn't find it). I'm going to use urpmi.addmedia to add those disks, but could that be causing similar problems?

Link to comment
Share on other sites

Ok. To know if cd2 and 3 are in the rpm database, type 'urpmi.removemedia' as root. It should tells you that the command is wrong and list you all the sources that are in the database. That should be obvious by now. If you only see cd1 then put cd1 in the cdrom and type that as root:

 

urpmi.removemedia -a

urpmi.addmedia --distrib cdrom removable:///mnt/cdrom

 

That should add the three cds to the database.

 

Oh yeah.. you should try to configure your net connection before the DHCP server. Rerun the drakconf thing (Network & internet) and make sure you can access the net before to play around with the ICS.

 

MOttS

Link to comment
Share on other sites

Guest KShots

Ok, I'm still not having any luck, so I'm going to post in detail the steps I took to get where I am:

 

1. All cards are in machine as well as CDROM

2. su to root

3. drakconf

4. choose Internet & Network and arrow over to the Ok button

5. I get the following choices:

Use auto detection [*]

Expert Mode [ ]

I choose neither and hit continue.

6. I now get the following choices:

Normal modem connection [ ]

Winmodem connection [ ]

ISDN connection [ ]

ADSL connection [ ]

Cable connection [ ]

LAN connection

I choose Cable and LAN connections and hit OK

7. I get a list of ethernet drivers like during the original install. Well, ok, I choose eepro and hit OK

8. Offers me Autoprobe and Specify options. I choose specify options

9. Asks for the following information:

io (comma separated numbers)

irq (comma separated numbers)

mem (comma separated numbers)

autodetect (a number)

I fill in io to be 0x210, irq=9, and I have no idea what the other two want so I leave them blank and hit ok

10. Asks if I have another network/main interface. I reply "Yes"

11. Another list of card drivers. I choose "ne" this time

12. Asks for Autoprobe or Specify options. I choose Specify options

13. Requests the following information:

io (comma separated numbers)

irq (comma separated numbers)

bad (comma separated numbers)

I fill in io=0x340 and irq=10, but have no idea what "bad" means, so I leave it blank and continue on.

14. Asks if I have another network/main interface. I reply no

15. Asks which network adapter I wish to use to connect to Internet. Choices are: eth0 (using module ne) or eth1 (using module eepro). I choose eth1

16. It again asks which drivers I want to use and I supply it with identical information from last time

17. "Configuring network device eth0 (driver ne)" requests the following information:

Automatic IP (bootp/dhcp/zeroconf)

IP address

Netmask

The ne driver is supposed to be connected to my internal network, so I give it static IP 192.168.0.1, turn off Automatic IP, and leave Netmask at 255.255.255.0.

18. "Configuring network device eth1 (driver eepro)" requests the same information. I turn on Automatic IP and leave the rest where it is (should be replaced by cable modem).

19. Requests a Zeroconf host name (not sure what that is), so I supply "MandrakeServer"

20. Again asks for card drivers. I again give it my card's data...

21. Again asks for IP information. I supply identical information as last time.

22. Asks for Zeroconf host name again, I supply it with the same name

23. You have configured multiple ways to connect to the Internet. Choose the one you want to use.

[b]cable

local network[/b]

I choose cable and continue

24. Shuts down eth0, eth1, and loopback interface, then starts them up again. The end.

 

I have an IP address from the cable modem, but no internet access :(

Link to comment
Share on other sites

Automatic IP (bootp/dhcp/zeroconf)<!--QuoteEBegin--><!--QuoteEBegin-->IP address<!--QuoteEBegin--><!--QuoteEBegin-->Netmask

 

The ne driver is supposed to be connected to my internal network, so I give it static IP 192.168.0.1, turn off Automatic IP, and leave Netmask at 255.255.255.0.

 

You should still be able to give it a static IP by assigning it an automatic IP with dhcp (have dhcp give it the static ip automagically). What you have effectively done is turned off dhcp I think. You need dhcp to share the internet connection or your box won't have access to the internet through your LAN server

Link to comment
Share on other sites

Hi KShots and Steve Scrimpshire

 

I have two suggestions for you KShots.

 

At step 6, try to ONLY choose CABLE. That way you should be faced with less stuff. Anyway we'll configure the LAN after you can access the internet from that box. We will play around with that for the ICS part or your setup. So try to access the net FIRST (choose CABLE at step 6) and then run the ICS wizard if you can access the net.

 

My second concern is about step 9 and 13. Since you supply that info (IO/IRQ), does the wizard modify your /etc/modules.conf? You can know that by checking the file's date before and after running the wizard. Something like that:

ls -l /etc/modules.conf

 

Also notice that I have an ADSL connection so I have no clue how to setup a CABLE connection. For ADSL the network cards (eth0 and eth1) are given an STATIC IP at boot and then the pppoe (ADSL) service starts. The pppoe service receives an IP from my ISP. So when I type 'ifconfig' I get

[root@localhost etc]# ifconfig

eth0      Lien encap:Ethernet  HWaddr 00:C0:4F:D8:EE:C4  

         inet adr:10.0.0.10  Bcast:10.0.0.255  Masque:255.255.255.0

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

         RX packets:7458764 errors:0 dropped:0 overruns:0 frame:0

         TX packets:7342813 errors:0 dropped:0 overruns:2 carrier:162

         collisions:2418 lg file transmission:100  

         RX bytes:276340098 (263.5 Mb)  TX bytes:2885031638 (2751.3 Mb)

         Interruption:19 Adresse de base:0xece0  

 

eth1      Lien encap:Ethernet  HWaddr 00:EE:B0:00:F2:D7  

         inet adr:192.168.1.1  Bcast:192.168.1.255  Masque:255.255.255.0

         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

         RX packets:8505015 errors:11 dropped:0 overruns:0 frame:0

         TX packets:8600348 errors:0 dropped:0 overruns:14 carrier:0

         collisions:0 lg file transmission:100  

         RX bytes:2821820996 (2691.0 Mb)  TX bytes:535791253 (510.9 Mb)

         Interruption:18 Adresse de base:0xbc00  

 

lo        Lien encap:Boucle locale  

         inet adr:127.0.0.1  Masque:255.0.0.0

         UP LOOPBACK RUNNING  MTU:16436  Metric:1

         RX packets:1577 errors:0 dropped:0 overruns:0 frame:0

         TX packets:1577 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0 lg file transmission:0  

         RX bytes:179141 (174.9 Kb)  TX bytes:179141 (174.9 Kb)

 

ppp0      Lien encap:Protocole Point-?-Point  

         inet adr:216.221.50.11  P-t-P:206.123.6.78  Masque:255.255.255.255

         UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

         RX packets:1226768 errors:0 dropped:0 overruns:0 frame:0

         TX packets:1115757 errors:0 dropped:0 overruns:0 carrier:0

         collisions:0 lg file transmission:3  

         RX bytes:726120085 (692.4 Mb)  TX bytes:402866751 (384.2 Mb)

So you see I have 4 devices now while I only have 2 in fact (eth0 and eth1). My ADSL service act like another device (ppp0). So that should not be very different for a CABLE connection. You could maybe try to search the forum a bit to see how this is accomplished.

 

You have closer to the end that you were yesterday man :wink:

 

MOttS

Link to comment
Share on other sites

Guest KShots
My second concern is about step 9 and 13. Since you supply that info (IO/IRQ), does the wizard modify your /etc/modules.conf? You can know that by checking the file's date before and after running the wizard. Something like that:  

ls -l /etc/modules.conf

No, it doesn't seem to modify anything in there...
Link to comment
Share on other sites

Hey .. last thing

 

If you tried to do (MY) step 6 before being absolutely sure the net is working, the ICS wizard installed 'iptables' and 'shorewall'. That could prevent you to access the net right now (not sure tho). So if you did run the ICS wizard before being sure you can access the net, I suggest you to uninstall those two packages. Do that as follow:

 

urpme shorewall

urpme iptables

 

Then reinstall iptables by typing

 

urpmi iptables

 

You have to uninstall and reinstall iptables because Shorewall modify iptables. If you only remove Shorewall, you'll never be able to access the net. I know that sucks.

 

MOttS

 

EDIT: Look at that link to configure the internet MANUALLY.

http://www.linuxheadquarters.com/howto/net...ablemodem.shtml

Link to comment
Share on other sites

Guest KShots

Well, I've now tried pretty much everything with drakconf... here's a copy of lfconfig after pretty much everything seems to be working correctly but still no inet...

 

eth0   Link encap:Ethernet  HWaddr 00:40:05:1C:74:DA

      inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0

      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

      RX packets:0 errors:0 dropped:0 overruns:0 frame:0

      TX packets:736 errors:0 dropped:0 overruns:0 carrier:0

      collisions:0 txqueuelen:100

      RX bytes:0 (0.0 b)  TX bytes:44160 (43.1 Kb)

      Interrupt:10 Base address:0x340



eth1   Link encap:Ethernet  HWaddr 00:A0:C9:59:65:F5

      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

      RX packets:14287 errors:0 dropped:0 overruns:0 frame:0

      TX packets:3 errors:52 dropped:0 overruns:0 carrier:106

      collisions:0 txqueuelen:100

      RX bytes:858842 (838.7 Kb)  TX bytes:10710 (10.4 Kb)

      Interrupt:9 Base address:0x210



eth1:9 Link encap:Ethernet HWaddr 00:A0:C9:59:65:F5

      inet addr:169.254.73.113  Bcast:169.254.255.255  Mask:255.255.0.0

      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

      Interrupt:9 Base address:0x210



lo     Link encap:Local Loopback

      inet addr:127.0.0.1 Mask:255.0.0.0

      UP LOOPBACK RUNNING MTU:16436  Metric:1

      RX packets:278 errors:0 dropped:0 overruns:0 frame:0

      TX packets:278 errors:0 dropped:0 overruns:0 carrier:0

      collisions:0 txqueuelen:0

      RX bytes:26596 (25.9 Kb)  TX bytes:26596 (25.9 Kb)

 

... and yet a ping tells me that I'm tring to ping from 192.168.0.1, not 169.254.73.113?

 

Hey .. last thing  

 

If you tried to do (MY) step 6 before being absolutely sure the net is working, the ICS wizard installed 'iptables' and 'shorewall'. That could prevent you to access the net right now (not sure tho). So if you did run the ICS wizard before being sure you can access the net, I suggest you to uninstall those two packages. Do that as follow:  

 

urpme shorewall  

urpme iptables  

 

Then reinstall iptables by typing  

 

urpmi iptables  

 

You have to uninstall and reinstall iptables because Shorewall modify iptables. If you only remove Shorewall, you'll never be able to access the net. I know that sucks.

Tried urpme shorewall and got: unknown package: shorewall... I think it never got far enough to install this, thankfully :)
Link to comment
Share on other sites

Four more suggestions for you:

 

1) Since 'eth1:9' returns ONLY problems when I search that in Google, try to put the modem on the other card (eth0). That may make a difference.. we never know. Also, the 'eth1:9' part of 'ifconfig' has a 'HWaddress' in it.. that does not make sense for a service (internet).

 

2) Since you don't provide a username/password to access the net, are you sure you don't need to tell you ISP about a 'new' ethernet card (and then a 'new' MAC adress) ? My link above notice that.

 

3) Try to set things manually with the link I gave you above.

 

4) Go sleep man !:P

 

MOttS

Link to comment
Share on other sites

I recently helped a friend with his setup, similar: 2 nics, one to the cablemodem (gets address via dhcp), the other to share the net.

 

He also gets this eth0:9 or eth1:9, happens on both cards! ....whichever is connected to the modem gets that... if he fiddles with the modem, switches it off, then on, then restarts the network or so (forgot which order), somehow it suddenly takes shape in the normal way, i.e. no more :9, just plain good addresses... and then the connection to the internet is functional.

 

As I don't have the same cards I couldn't try if it would be the same for me (I also have one machine as server and gateway, with two nics)....

 

BTW to make sure things are ok, if you don't have a monitor/keyboard/mouse on that pc, just connect to it with another pc via ssh, then start vnc, then you can do everything graphically. Naturally for this to work, at least one nic must be functional... :)

 

In MCC, network, there is some entry for safety/firewall (forgot what it says), make sure you turn it off for testing, if it's on (what gets set when you choose internet sharing) the dumb box doesn't even respond to ping anymore, .....

 

Oh yeah, this colleague only had a tv connected to his server,... that was a b*tch to set up..

Link to comment
Share on other sites

He also gets this eth0:9 or eth1:9, happens on both cards! ....whichever is connected to the modem gets that... if he fiddles with the modem, switches it off, then on, then restarts the network or so (forgot which order), somehow it suddenly takes shape in the normal way, i.e. no more :9, just plain good addresses... and then the connection to the internet is functional.

This is COOL. Thanks aRTee... I'm sure that will help KShots. You said exactly what is explained here (my previsous link to configure the internet manually).

 

One important querk is that it takes about an hour for them to enter the cable modem in their system.  I had to unplug the power supply from my cable modem and plug it back it for it to "reset" and grab an IP address.  Other than that, no problems

 

In MCC, network, there is some entry for safety/firewall (forgot what it says), make sure you turn it off for testing, if it's on (what gets set when you choose internet sharing) the dumb box doesn't even respond to ping anymore, .....

I don't think KShots will have that entry in the MCC because Shorewall doesn't seems to be installed (he tried 'urpme shorewall' and got 'unknown package: shorewal'). Also, even if that software would be installed, turning it off does not solve the problem. When turned off, shorewall blocks EVERYTHING. The only way is to write things down in /etc/shorewall/routestopped as explained here:

# Shorewall 1.3 -- Hosts Accessible when the Firewall is Stopped

#

# /etc/shorewall/routestopped

#

#       This file is used to define the hosts that are accessible when the  

#       firewall is stopped

But he will have to play with Shorewall eventually when things will work correctly (soon!) ;-)

 

MOttS

Link to comment
Share on other sites

You said exactly what is explained here (my previsous link to configure the internet manually).

 

Owww how could I have missed that!

LOL ;)

with all the links you posted!

 

Anyhow, I hope KShots will manage, so KShots, please post if you do!

 

(I'm really hoping to read a message from you stating: hey, writing this from a linux machine connected to my inet server... :) )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...