[slackware 8] 2 netwerkkaarten instellen

Pagina: 1
Acties:

  • klown
  • Registratie: November 2001
  • Laatst online: 21:21
Ik ben bezig een routertje/servertje te maken met slackware 8, die aan adsl ethernet komt te hangen.

Het instellen van de 2 netwerkkaarten lukt niet.
Er zit een 3com 3c509 (ISA)kaart een realtek 10/100 Mbit (PCI)kaartje in. (RTL8139)

volgens mij staat er nog iets fout in de /etc/rc.d/inet1, maar ik kan niet ontdekken wat

mijn lsmod
code:
1
2
3
4
root@amd300:/home/tom# lsmod
Module          Size  Used by
8139too         12160   0  (unused)
3c509            7824   1

mijn ifconfig
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@amd300:/home/tom# ifconfig
eth0    Link encap:Ethernet  HWaddr 00:10:5A:2E:D4:F8
        inet addr:10.0.0.151  Bcast:10.0.0.255  Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:4 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:100
        RX bytes:523 (523.0 b)  TX bytes:0 (0.0 b)
        Interrupt:5 Base address:0x220

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:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0
        RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

mijn laatste stukje van de dmesg
code:
1
2
3
4
5
6
7
8
9
Adding Swap: 248968k swap-space (priority -1)
eth0: 3c5x9 at 0x220, 10baseT port, address  00 10 5a 2e d4 f8, IRQ 5.
3c509.c:1.18 12Mar2001 becker@scyld.com
http://www.scyld.com/network/3c509.html
8139too Fast Ethernet driver 0.9.22
PCI: Found IRQ 9 for device 00:0a.0
eth1: RealTek RTL8139 Fast Ethernet at 0xc4842000, 00:10:a7:0b:f3:47, IRQ 9
eth1:  Identified 8139 chip type 'RTL-8139C'
eth0: Setting Rx mode to 1 addresses.

mijn /etc/rc.d/rc.inet1
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
HOSTNAME=cat /etc/HOSTNAME
# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# intranet device
insmod /lib/modules/2.4.17/kernel/drivers/net/8139too.o

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the
# eth0 interface.

# Edit these values to set up a static IP address:
IPADDR="10.0.0.151"     # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
NETWORK="10.0.0.0"  # REPLACE with YOUR network address!
BROADCAST="10.0.0.255"  # REPLACE with YOUR broadcast address, if you
                # have one. If not, leave blank and edit below.
GATEWAY="10.0.0.151"    # REPLACE with YOUR gateway address!


# dit stukje zelf toegevoegd
GATEWAY="" # REPLACE with YOUR gateway address!
IPADDR1="192.168.0.1"
NETWORK1="192.168.0.0"
BROADCAST1="192.168.0.255"
# tot hier

# To use DHCP instead of a static IP, set this value to "yes":
DHCP="no"       # Use DHCP ("yes" or "no")

# OK, time to set up the interface:
if [ "$DHCP" = "yes" ]; then # use DHCP to set everything up:
  echo "Attempting to configure eth0 by contacting a DHCP server..."
  /sbin/dhcpcd
elif [ ! "$IPADDR" = "127.0.0.1" ]; then # set up IP statically:
  # Set up the ethernet card:
  echo "Configuring eth0 as ${IPADDR}..."
  /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

  # If that didn't succeed, give the system administrator some hints:
  if [ ! $? = 0 ]; then
    cat << EOF

# dit stukje zelf toegevoegd
# Set up the ethernet card:
echo "Configuring eth1 as ${IPADDR}..."
/sbin/ifconfig eth1 ${IPADDR1} broadcast ${BROADCAST1} netmask ${NETMASK1}


# tot hier
Your ethernet card was not initialized properly.  Here are some reasons why
thi
may have happened, and the solutions:
1. Your kernel does not contain support for your card.  Including all the
   network drivers in a Linux kernel can make it too large to even boot, and
   sometimes including extra drivers can cause system hangs.  To support
your
   ethernet, either edit /etc/rc.d/rc.modules to load the support at
boottime,
   or compile and install a kernel that contains support.
2. You don't have an ethernet card, in which case you should comment out
this
   section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this
error...)
EOF
  fi

  # Older kernel versions need this to set up the eth0 routing table:
  KVERSION=name -r | cut -f 1,2 -d .`
  if [ "$KVERSION" = "1.0" -o
"$KVERSION" = "1.1" \
   -o "$KVERSION" = "1.2" -o "$KVERSION" = "2.0" -o "$KVERSION" = "" ]; then
    /sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
  fi

  # If there is a gateway defined, then set it up:
  if [ ! "$GATEWAY" = "" ]; then
    /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
  fi
fi

# End of rc.inet1

iemand die een foutje ziet? (waarschijnlijk in inet1)

MSI K7T266 Pro2|AMD Athlon XP 1800+|512 MB DDR|Leadtek Geforce 2 Ti 64 MB DDR|LG 16x DVD|IBM 60 GB 7200 rpm HD|Creative soundworks DTT3500 speakers|IIyama A902MT|Wacom Graphire 2|Logitech Mouseman Dual optical & MX500|Creative soundbl. Audigy|Trust sp


  • imdos
  • Registratie: Maart 2000
  • Laatst online: 05-08 12:09

imdos

I use FreeNAS and Ubuntu

Je hebt geen netmask ingevoerd, maar je kunt volstaan door die 1 weg te halen op het einde en dezelfde netmask gebruiken!

pvoutput. Waarom makkelijk doen, als het ook moeilijk kan! Every solution has a new problem


  • klown
  • Registratie: November 2001
  • Laatst online: 21:21
Dat heb ik nu verbeterd, maar de realtek krijgt nog steeds geen ipadres, staat ook nog niet bij de ifconfig.
(bij lsmod staat achter de module van de realtek used by op 0 (unused), klopt dat wel?)
de 3com is perfect geinstalleerd, die kan pingen naar andere pc's en alles. Het draait dus om de realtek....iemand nog een idee?

MSI K7T266 Pro2|AMD Athlon XP 1800+|512 MB DDR|Leadtek Geforce 2 Ti 64 MB DDR|LG 16x DVD|IBM 60 GB 7200 rpm HD|Creative soundworks DTT3500 speakers|IIyama A902MT|Wacom Graphire 2|Logitech Mouseman Dual optical & MX500|Creative soundbl. Audigy|Trust sp


  • loial
  • Registratie: Januari 2001
  • Laatst online: 17-09-2024
het feit dat je realtek module wel geladen is maar 0 keer geused wordt, is omdat bij ifconfig je eth1 ook niet up is...
bij ifconfig -a moet je eth1 wel bij staan, anders is er iets anders mis (iets met module ofzo)
maar ik denk dat als je dit hieronder oplost, het allemaal wel goed komt:
Op woensdag 20 februari 2002 14:39 schreef klown het volgende:
...
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# OK, time to set up the interface:
if [ "$DHCP" = "yes" ]; then # use DHCP to set everything up:
  echo "Attempting to configure eth0 by contacting a DHCP server..."
  /sbin/dhcpcd
elif [ ! "$IPADDR" = "127.0.0.1" ]; then # set up IP statically:
  # Set up the ethernet card:
  echo "Configuring eth0 as ${IPADDR}..."
  /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

  # If that didn't succeed, give the system administrator some hints:
  if [ ! $? = 0 ]; then
    cat << EOF

# dit stukje zelf toegevoegd
# Set up the ethernet card:
echo "Configuring eth1 as ${IPADDR}..."
/sbin/ifconfig eth1 ${IPADDR1} broadcast ${BROADCAST1} netmask ${NETMASK1}


# tot hier
Your ethernet card was not initialized properly.  Here are some reasons why...
blablabla
...section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this
error...)
EOF
  fi

iemand die een foutje ziet? (waarschijnlijk in inet1)
Ik denk dat ik hier dus wel wat zie ja...
zie je de:
code:
1
2
  if [ ! $? = 0 ]; then
    cat << EOF

die eindigt niet met een 'fi'
daarom wordt jouw stukje:
code:
1
2
echo "Configuring eth1 as ${IPADDR}..."
/sbin/ifconfig eth1 ${IPADDR1} broadcast ${BROADCAST1} netmask ${NETMASK1}

niet uitgevoerd...
je moet je stukje dus zetten na:
code:
1
2
3
4
...section of /etc/rc.d/rc.inet1.  (Unless you don't mind seeing this
error...)
EOF
  fi

of voor
code:
1
2
  if [ ! $? = 0 ]; then
    cat << EOF

probeer dat maar eens ;)

Verwijderd

Je hebt GATEWAY 2 keer gedefinieerd. Denk niet dat dat de bedoeling is.
Wat je ook kunt doen is de originele rc.inet1 kopieren naar bijvoorbeeld rc.inet10 en die aan laten roepen vanuit rc.M , direct na rc.inet1 en voor rc.inet2 . Je kunt dan je nieuwe script voorzien van de waardes die je wilt. Je zult dan wel alle eth0 in eth1 moeten wijzigen en waarschijnlijk de regel waar de default gw wordt gezet uit moeten commenten of geen GATEWAY definieren.

  • klown
  • Registratie: November 2001
  • Laatst online: 21:21
Heb em ondertussen al

moest nog even doen
code:
1
ifconfig eth1 up

en
[code
ifconfig eth1 192.168.0.1
[/code]

adsl wil nog niet, nog even prutsen daarmee 8-)

MSI K7T266 Pro2|AMD Athlon XP 1800+|512 MB DDR|Leadtek Geforce 2 Ti 64 MB DDR|LG 16x DVD|IBM 60 GB 7200 rpm HD|Creative soundworks DTT3500 speakers|IIyama A902MT|Wacom Graphire 2|Logitech Mouseman Dual optical & MX500|Creative soundbl. Audigy|Trust sp


  • loial
  • Registratie: Januari 2001
  • Laatst online: 17-09-2024
juist, dat zei ik...en als je het nou meteen ff aanpast in je rc.inet1 (zie mijn post hierboven) dan werkt het na je volgende reboot ook nog ;)
Pagina: 1