connecting to the network

2009-05-13 13:20:29来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


This section deals with setting up a Network Interface Card (NIC) and making it work with FreeBSD.  With a working NIC, your computer can communicate with other computers on a network.
Matching hardware and software
In order for the software to use the hardware, it must know something about it.   For a NIC, this means that the IRQ and IO address must match what FreeBSD will be looking for.  If they don't match, either FreeBSD should be modified or the NIC should be modified.
Modifying the NIC
To change the IRQ or IO address on NIC will involve either some jumpers and/or switches or a floppy disk.  The easy way is a floppy disk.  Just insert that disk and reboot your machine.  Normally this requires a DOS bootable disk, but you should be able to find one.  These programs are usually easy to run.
Modifying FreeBSD
If you know what the settings of your NIC, it is fairly simple to change the FreeBSD settings.  At the reboot prompt, enter -c.  After the boot finishes, use the visual option to view and change the settings of your system.
Configure the interface
In this page, we'll refer to ed0 which is an NE2000 compatible device.   FreeBSD normally expects this card to be configured with IRQ 10 and base address of 0x280.  What I prefer to do is set the card to match this.  I will now assume that you have configured hardware to match the software (or vice versa, whatever).
The first step is to inet the card.  Do this by issuing:
ifconfig ed0 inet  
where  is the IP address you wish to assign to this NIC and  is the mask you wish to use.
Testing the interface
The first test is:
ping 127.0.0.1
You should see something like:
PING 127.0.0.1 (127.0.0.0): 56 data bytes
64 bytes from 127.0.0.1: icmpseq=0 ttl=255 time=0.819s
64 bytes from 127.0.0.1: icmpseq=1 ttl=255 time=0.586s
64 bytes from 127.0.0.1: icmpseq=2 ttl=255 time=0.554s
64 bytes from 127.0.0.1: icmpseq=2 ttl=255 time=0.549s
^C
--- 127.0.0.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/std-dev = 0.549/0.627/0.819/0.112ms
PING will continue to run until you interrupt it, as I did using CTRL-C.
This address should work on all machine and it represents the local host.  If this doesn't work, I have no suggestions.
The next test will ensure that the system can find the correct IP.
ping
where  is the IP address you specified during the ifconfig above.  If you've forgotten the IP, issue ifconfig -a and use the address you find there.  You should see something similar to the previous results, but with different numbers.
The last test is to ping something else on your network.  Ping an IP address, which you know exists, and ping that one.  If that doesn't work, but the others do, seek help.  Sorry, but I can't help you more than that.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Adding a second network card (and compiling a kern

下一篇:installing qpopper (a POP server)