pc
Well, continuing with the previous article, we are going to configure our network card.
omit the graphics options are different depending on distributions and / or graphics servers and go directly to shell commands.
First of all: ifconfig.
Issued without arguments, shows the current configuration of your network card, for configuration, follow this syntax: # ifconfig interface address
options for example: # ifconfig eth0 192.168.1.10
boardcast 192.168.1.255 netmask 255.255.255.0 eth0
assigns specific boardcast and address and netmask.
Once assigned address, you can activate the interface with the following command: # ifconfig eth0 up
It is not finished the job, and now we have given an address to our interface, we must also say to our pc where they must be routed packets traversing the network using the Kingston route command.
Even here, with the simple command to check the current situation. Now
to route packets to the router (eg with address 192.168.1.1), run: # route add 192.168.1.1
# route add default gw 192.168.1.1
In this case, before I add the address of the router in the routing table and then address specific concerns that the gateway.
then enter the dns dns
I have servers that "translates" the IP addresses to domain names and vice versa, without them, would not answer www.google.it launching.
To insert just go in etc / resolv.conf and insert this:
nameserver 'dns address 1'
nameserver 'dns address 2'
Now everything should be fine, you can also go to check and edit the configuration file of the network adapter that is located in / etc/sysconfig/network-scripts/ifcfg-eth0 (if the interface was eth0).
the way, the locations of configuration files refer to a herd, should be the same with regard to the distributions based on Red-Hat, but may be different (but not so much) for distributions like suse, debian and derivatives, slack, but, basically, just play around a bit. Typical
occupation of a self-respecting Linux user;)
0 comments:
Post a Comment