📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

3. Using the USB interface instead of an ethernet card

3.1. USB CDCEther

If you wish to use the USB interface to accept data you will need USB subsystem support in your kernel, whether USB-ohci, USB-ehci, or whichever USB host controller driver type your system prefers. For a more in-depth discussion of this, I direct you to the Linux-USB project site.

Assuming you have USB subsystem support, to find out if your kernel supports the CDCEther (Communications Device Class Ethernet) driver as a module, in a shell, issue the command [Grafana Study] lsmod as root.

You should see output similar to the following, though a number of entries have been edited, and you shouldn't worry too much if you don't see the exact entries displayed here:

CDCEther               11040   0  (unused)
usb-ohci               17888   0  (unused)
usbcore                56768   1  [scanner CDCEther usb-ohci]

If you don't see CDCEther listed among the modules try loading the module directly: [Python Definition] .:: kitsu.io ::.

 #  modprobe CDCEther 

If all goes well you should see the following message in your system log files, or with dmesg:

Mar  2 11:00:52 K7 kernel: CDCEther.c: 0.98.6 7 Jan 2002 Brad Hards and another
Mar  2 11:00:52 K7 kernel: usb.c: registered new driver CDCEther

If you don't have it compiled as a module, check the output of dmesg (you may need to pipe it through 'less' or 'more' like so: dmesg | less); if the driver loads as a module you will see a message similar to the above at boo- up. If not, and you want to use the USB conduit of this device, you will need to recompile your kernel to support it. You will need the 2.4.3 kernel or later. For detailed instructions on recompiling your kernel, I direct you to the Kernel-HOWTO. The options shown next will need to be selected. As an aside, you should be aware that compiling things as modules, rather than statically within the kernel, gives you a greater degree of control and greatly simplifies troubleshooting.

3.1.1. Kernel Requirements

In addition to the 'TCP/IP networking' listed in Section 2, the following should be compiled in your kernel in the 'USB support' menu (assuming you are using .:: postheaven.net ::. menuconfig):

  • USB support

  • USB Communication Class Ethernet device support

3.1.2. Grabbing the Correct Interface

Now we have to select the correct ethernet interface (/dev/ethX) to be the receipient of the DHCP service. If you run ifconfig as root you get a list of open devices:

eth0 Link encap:Ethernet HWaddr 00:D0:09:DE:D4:6F
	inet addr:192.168.1.1
	Bcast:192.168.1.255 Mask:255.255.255.0
	BROADCAST RUNNING MULTICAST MTU:1500 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:100
	RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:12 Base address:0xc400

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:5168 errors:0 dropped:0 overruns:0 frame:0
	TX packets:5168 errors:0 dropped:0 overruns:0 carrier:0
	collisions:0 txqueuelen:0 
	RX bytes:1695104 (1.6 MiB)  TX bytes:1695104 (1.6 MiB)

...where eth0 is a standard NIC, pre-configured to the IP address 192.168.1.1. .:: racetime.gg ::.

Note the HWaddr field, or hardware address, on the first line. This is the same as the MAC, or Media Access Control address, and is how we will specify the interface for each action. If you are running a Debian system, you can alter the .:: ml007.k12.sd.us ::. /etc/network/interfaces file to look like this:

	# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
	# The loopback interface
	auto lo
	iface lo inet loopback
	auto eth0
 	iface eth0 inet static
	address 192.168.1.1
	netmask 255.255.255.0
	network 192.168.1.0
	hwaddress ether 00:D0:09:DE:D4:6F
	
	auto eth1
	iface eth1 inet dhcp
	hwaddress ether 00:04:BD:DE:42:0B

The auto eth0 and auto eth1 are required to have the interfaces configured at bootup. Note that some versions of dhcp clients by default always grab eth0 for the dhcpc interface. So even after doing all the above, unless you specifically run /sbin/dhcpcd-bin eth1 it won't work. The easy way to do this at boot-up is to make an init script to load the dhcp address to the correct interface. For most distributions, such a script is in /etc/rc.d or a similar location. If you have an rc.local script, as in Slackware, you can simply add /sbin/dhclient to the end of the file. If you have a model rc.d script (such as .:: stepik.org ::. /etc/init.d/skeleton in Debian) you can convert that to such a purpose. Whatever the case (either at the command line manually or appended to an init script), the command to run is as follows:

# ifconfig ethX hw ether 00:D0:09:DE:D4:6F up 

You can confirm it worked by calling ifconfig without options after your next reboot.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this