View previous topic :: View next topic |
Author |
Message |
shaumux Veteran
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Thu May 19, 2005 8:18 pm Post subject: Configuring Ethernet |
|
|
Hi
i was given my
IP address
Subnet mask
Gateway
DNS Server
Now where and how do i put these in
I read in the docs of the universal cd about some /etc/conf.d/net
Do i put these in here
If so there is something called broadcast also i that
Wat is this broadcast
also it doesnt have any subnet mask part just netmask are they the same thing
and where do i put the DNS Server address.
THNKS |
|
Back to top |
|
|
pogi Tux's lil' helper
Joined: 13 May 2005 Posts: 124 Location: Hungary
|
Posted: Thu May 19, 2005 8:41 pm Post subject: |
|
|
assuming that, your ethernet card connected to the internet or lan is eth0, you have to edit the line in /etc/conf.d/net starts with 'iface_eth0=' like:
Code: | iface_eth0="<your ip address> broadcast <your broadcast address> netmask <your netmask>" |
broadcast is your IP address with 255 at the end, like *.*.*.255
netmask is subnet mask, usually 255.255.255.0
then scroll to the end of the file to set gateway
Code: | gateway="eth0/<your IP address>" |
dns server goes to /etc/resolv.conf:
Code: | domain <domainname aka workgroup>
nameserver <dns server ip> |
pogi _________________ Free! Tibet |
|
Back to top |
|
|
-Craig- Guru
Joined: 03 Jun 2004 Posts: 333
|
Posted: Thu May 19, 2005 8:58 pm Post subject: |
|
|
pogi wrote: |
broadcast is your IP address with 255 at the end, like *.*.*.255
netmask is subnet mask, usually 255.255.255.0
|
NO NO NO !!!
The broadcast can be another address e.g. if your IP is 192.168.64.1 with a netmask of 255.255.192.0 your broadcast would be 192.168.127.255 !! It depends on the netmask!!
Read this: http://en.wikipedia.org/wiki/Subnetting
Ok now the answers:
Lets assume that
Router IP has 192.168.0.2
Broadcast has 192.168.0.255
netmask has 255.255.255.0
DNS has 192.168.0.1
Gateway has 192.168.0.1
This is your new /etc/conf.d/net:
Code: |
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"
|
Your DNS server goes to /etc/resolv.conf:
Code: | nameserver 192.168.0.1 |
Of course, you need to use YOUR addresses, this was just an example.
And subnet mask is the same as netmask !
Hope this helped! |
|
Back to top |
|
|
shaumux Veteran
Joined: 13 May 2005 Posts: 1013 Location: Hamburg
|
Posted: Thu May 19, 2005 9:07 pm Post subject: |
|
|
THNKS for the quick reply
so if subnet mask is 255.255.255.0
then broadcast will just be my ip address with 255 in the last place like 192.168.222.255
am i right
and in resolv.conf
is it necessary to give domainname |
|
Back to top |
|
|
-Craig- Guru
Joined: 03 Jun 2004 Posts: 333
|
Posted: Tue May 24, 2005 7:55 pm Post subject: |
|
|
shaumux wrote: | THNKS for the quick reply
so if subnet mask is 255.255.255.0
then broadcast will just be my ip address with 255 in the last place like 192.168.222.255
am i right
|
Yes.
shaumux wrote: | and in resolv.conf
is it necessary to give domainname |
No.
Just:
Code: | nameserver 127.0.0.1 |
would be ok. |
|
Back to top |
|
|
|