Setting a LAN

Hi,
i’m trying to set-up a LAN with suse 10.1.
I’m using a static ip, and ifconfig to setup the ip address.
ifconfig seems to set-up fine the network card: I can ping the card but I can’t ping other pcs.
I receive a “host unreachable” message and the card doesn’t blink.

Can someone help me?
Thanks

vitas99 wrote:

>
> Hi,
> i’m trying to set-up a LAN with suse 10.1.
> I’m using a static ip, and ifconfig to setup the ip address.
> ifconfig seems to set-up fine the network card: I can ping the card but
> I can’t ping other pcs.
> I receive a “host unreachable” message and the card doesn’t blink.
>
> Can someone help me?
> Thanks
>
>
Can you ping something on the internet like google? Are you trying to ping
be ip address or host name?

I’m trying to connect only 3 pcs, 2 linux and a win pc.
I ping ip address, when I ping from win pc I receive the message “request timed out”, when I ping from 2 linux pcs I receive “unreachable host”

vitas99 wrote:

>
> I’m trying to connect only 3 pcs, 2 linux and a win pc.
> I ping ip address, when I ping from win pc I receive the message
> “request timed out”, when I ping from 2 linux pcs I receive
> “unreachable host”
>
>
What are the outputs to the following commands:

  1. route
  2. ifconfig
  3. cat /etc/resolv.conf

Also, are these connected to a switch, router, hub?

Maybe it’s obvious but: all pcs belong to the same subnet? If the subnet mask is set to 255.255.255.0 only the last 3 digits of the physical address of each machine can be different

If you want to ping a card by name rather than by IP address:
You need to tell the OS what IP address a name is paired to. You are talking about a windows network. For that you can manually set the name/IP pairing in one of these locations:

  • hosts file at /etc/hosts
  • a private name server like DNS
  • the LAN hosts file lmhosts at /etc/samba/lmhosts

But these imply a static setup, fixed name/IP pairings around the whole LAN. So they aren’t usually used. For DHCP-assigned LANs it’s more usual to let Suse learn the addresses of netBIOS names in terms of IP addresses on the LAN and then use those in the ping process. Here’s what you should do:

  1. Tell Suse to use the wins service in resolving hosts by altering this line in the file /etc/nsswitch.conf:

hosts: files dns

to this:

hosts: files dns wins
  1. Turn on the samba daemons in Yast → susyem → system services runlevels → activate nmb and smb in the list.
  2. Allow Samba broadcasts through the firewall (for now just turn it off until all the rest is working).
  3. Arrange for Suse to “learn” the locations of LAN machines by installing adequate name resolution mechanisms into its Samba configuration by changing the default [global] paragraph to include these lines:

netbios name = dell101
name resolve order = bcast host lmhost wins
local master = yes
os level = 35

Choose your own netbios name, preferably but not necessarily your Linux hostname (you see it in your console prompt). Also and make sure that the line like this:

workgroup = TUX-XYZ

is changed to be exact match to all the machines on the LAN

Then reboot twice and if you can locate network computers in your browser at address smb://, then you should be able to ping by name. But don’t take shortcuts.

It’s implicit that when you can ping by name, your LAN is by then setup too.

Phew

For now I’m using only ip address, not hostname.
I’ve a switch, but I tried also direct connection by cross-cable

The outputs of ifconfig, route and cat /etc/resolv.conf are:

ifconfig:

eth0 Link encap:Ethernet HWaddr 00:10:18:34:8F:52
inet addr:192.168.10.3 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST 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:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:169

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
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)

route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo

cat /etc/resolve.conf

domain etapsite

Just came across this opld one: you haven’t configured your net card for internet access or lan use in Yast.