Aller au contenu

netstat et linux/unix


nvidia

Messages recommandés

effectivement sous linux il va la et le fichier est code en hexa.

Par contre sous hp unix il ya pas de proc, faut que je trouve la corespondance.

Sinon lorsque je fait:

# route add -net 192.168.139.0 netmask 255.255.255.0 gateway 192.168.140.225

il me repond:

usage: add destination [netmask mask] gateway [metric]

Je voispas ou est l erreur

:modoreussi:

Lien vers le commentaire
Partager sur d’autres sites

Par contre ds le fichier /etc/rc.config.d/netconf on peut configurer le reseau a la main et j ai rentre l adresse de la passerelle:

ROUTE_DESTINATION[0]="default"

ROUTE_MASK[0]=""

ROUTE_GATEWAY[0]="192.168.140.225"

ROUTE_COUNT[0]="1"

ROUTE_ARGS[0]=""

Mais bon je me demande s'il faut pas redemarrer ma machine pour que la modif soit pris en compte.

Je sais vous aller me dire et ho t'es pas sous windows la, c vrai :modoreussi: mais bon je me demande si il faut pas que je redemarre au moins mes services reseaux qd meme

Lien vers le commentaire
Partager sur d’autres sites

effectivement sous linux il va la et le fichier est code en hexa.

Par contre sous hp unix il ya pas de proc, faut que je trouve la corespondance.

Sinon lorsque je fait:

# route add -net 192.168.139.0 netmask 255.255.255.0 gateway 192.168.140.225

il me repond:

usage: add destination [netmask mask] gateway [metric]

Je voispas ou est l erreur

:modoreussi:

L'erreur est toute simple:

remplace "gateway" par "gw": l'informaticien est paresseux!

Lien vers le commentaire
Partager sur d’autres sites

Heu non c pas ca:

route add -net 192.168.139.0 netmask 255.255.255.0 gw 192.168.140.225

usage: add destination [netmask mask] gateway [metric]

Pareil que avec gateway.

Merci qd meme de ton aide.

Je viens de tester sur mon pc, et cette commande marche.

essaie tout simplement:

#route add default gw 192.168.140.225

Lien vers le commentaire
Partager sur d’autres sites

si si mais meme avec le man je vois ou ca cloche

je crois que je vais devenir dingue :transpi:

Voila le man de route:

route(1M) route(1M)

NAME

route - manually manipulate the routing tables

SYNOPSIS

/usr/sbin/route [-f] [-n] [-p pmtu] add [net|host] destination

[netmask mask] gateway [count]

/usr/sbin/route [-f] [-n] delete [net|host] destination

[netmask mask] gateway [count]

/usr/sbin/route -f [-n]

DESCRIPTION

The route command manipulates the network routing tables manually.

You must have appropriate privileges.

Subcommands

The following subcommands are supported.

add Add the specified host or network route to the

network routing table. If the route already

exists, a message is printed and nothing changes.

delete Delete the specified host or network route from

the network routing table.

Options and Arguments

route recognizes the following options and arguments.

-f Delete all route table entries that specify a

remote host for a gateway. If this is used with

one of the subcommands, the entries are deleted

before the subcommand is processed.

-n Print any host and network addresses in Internet

dot notation, except for the default network

address, which is printed as default.

-p pmtu Specifies a path maximum transmission unit (MTU)

value for a static host route. The minimum value

allowed is 68 bytes; the maximum is the MTU of the

outgoing interface for this route. This option

only applies to adding a host route. In all other

cases, this option is ignored and has no effect on

a system.

You can also disable the Path MTU Discovery for a

host route by specifying pmtu as zero.

net

Hewlett-Packard Company - 1 - HP-UX Release 10.20: July 1996

route(1M) route(1M)

The type of destination address. If this argument

or is omitted, routes to a particular host are

host distinguished from those to a network by

interpreting the Internet address associated with

destination. If the destination has a local

address part of INADDR_ANY(0), the route is

assumed to be to a network; otherwise, it is

treated as a route to a host.

destination The destination host system where the packets will

be routed. destination can be one of the

following:

+ A host name (the official name or an alias,

see gethostbyname(3N)).

+ A network name (the official name or an

alias, see getnetbyname(3N)).

+ An Internet address in dot notation (see

inet(3N)).

+ The keyword default, which signifies the

wildcard gateway route (see routing(7)).

netmask

mask The mask that will be bit-wise ANDed with

destination to yield a net address where the

packets will be routed. mask can be specified as

a single hexadecimal number with a leading 0x,

with a dot-notation Internet address, or with a

pseudo-network name listed in the network table

(see networks(4)). The length of the mask, which

is the number of contiguous 1's starting from the

leftmost bit position of the 32-bit field, can be

shorter than the default network mask for the

destination address. (see routing (7)). If the

netmask option is not given, mask for the route

will be derived from the netmasks associated with

the local interfaces. (see ifconfig (1)). mask

will be defaulted to the longest netmask of those

local interfaces that have the same network

address. If there is not any local interface that

has the same network address, then mask will be

defaulted to the default network mask of

destination.

gateway The gateway through which the destination is

reached. gateway can be one of the following:

+ A host name (the official name or an alias,

see gethostbyname(3N)).

+ An Internet address in dot notation (see

inet(3N)).

Hewlett-Packard Company - 2 - HP-UX Release 10.20: July 1996

route(1M) route(1M)

count An integer that indicates whether the gateway is a

remote host or the local host. If the route leads

to a destination through a remote gateway, count

should be a number greater than 0. If the route

leads to destination and the gateway is the local

host, count should be 0. The default for count is

zero. The result is not defined if count is

negative.

Operation

All symbolic names specified for a destination or gateway are looked

up first as a host name using gethostbyname(); if the host name is not

found, the destination is searched for as a network name using

getnetbyname(). destination and gateway can be in dot notation (see

inet(3N)).

If the -n option is not specified, any host and network addresses are

displayed symbolically according to the name returned by

gethostbyaddr() and getnetbyaddr(), respectively, except for the

default network address (printed as default) and addresses that have

unknown names. Addresses with unknown names are printed in Internet

dot notation (see inet(3N)).

If the -n option is specified, any host and network addresses are

printed in Internet dot notation except for the default network

address which is printed as default.

If the -f option is specified, route deletes all route table entries

that specify a remote host for a gateway. If it is used with one of

the subcommands described above, the entries are deleted before the

subcommand is processed.

Path MTU Discovery is a technique for discovering the maximum size of

an IP datagram that can be sent on an internet path without causing

datagram fragmentation in the intermediate routers. In essence, a

source host that utilizes this technique initially sends out datagrams

up to the the size of the outgoing interface. The Don't Fragment (DF)

bit in the IP datagram header is set. As an intermediate router that

supports Path MTU Discovery receives a datagram that is too large to

be forwarded in one piece to the next-hop router and the DF bit is

set, the router will discard the datagram and send an ICMP Destination

Unreachable message with a code meaning "fragmentation needed and DF

set". The ICMP message will also contain the MTU of the next-hop

router. When the source host receives the ICMP message, it reduces

the path MTU of the route to the MTU in the ICMP message. With this

technique, the host route in the source host for this path will

contain the proper MTU.

By default, Path MTU Discovery is enabled for TCP sockets and disabled

for UDP sockets.

Hewlett-Packard Company - 3 - HP-UX Release 10.20: July 1996

route(1M) route(1M)

If the -p pmtu option is specified for a host route, the pmtu value is

considered permanent for the host route. Even if the Path MTU

Discovery process discovers a smaller pmtu for this route at a later

time, the pmtu field in the host route will not be updated. A warning

message will be logged with the new pmtu value.

The -p pmtu option is useful only if you knows the network environment

well enough to enter an appropriate pmtu for a host route. IP will

fragment a datagram to the pmtu specified for the route on the local

host before sending the datagram out to the remote. It will avoid

fragmentation by routers along the path, if the pmtu specified in the

route command is correct.

ping can be used to find the pmtu information for the route to a

remote host. The pmtu information in the routing table can be

displayed with the netstat -r command (see netstat(1)).

Output

add destination: gateway gateway

The specified route is being added to the tables.

delete destination: gateway gateway

The specified route is being deleted from the tables.

Flags

The values of the count and destination type fields in the route

command determine the presence of the G and H flags in the netstat -r

display and thus the route type, as shown in the following table.

Count Destination Type Flags Route Type

_________________________________________________________________

=0 network U Route to a network directly

from the local host

>0 network UG Route to a network through a

remote host gateway

=0 host UH Route to a remote host

directly from the local host

>0 host UGH Route to a remote host through

a remote host gateway

=0 default U Wildcard route directly from

the local host

>0 default UG Wildcard route through a

remote host gateway

_________________________________________________________________

DIAGNOSTICS

The following error diagnostics can be displayed.

Hewlett-Packard Company - 4 - HP-UX Release 10.20: July 1996

route(1M) route(1M)

add a route that already exists

The specified entry is already in the routing table.

add too many routes

The routing table is full.

delete a route that does not exist

The specified route was not in the routing table.

WARNINGS

Reciprocal route commands must be executed on the local host, the

destination host, and all intermediate hosts if routing is to succeed

in the cases of virtual circuit connections or bidirectional datagram

transfers.

The HP-UX implementation of route does not presently support a change

subcommand.

AUTHOR

route was developed by the University of California, Berkeley.

FILES

/etc/networks

/etc/hosts

SEE ALSO

netstat(1), ifconfig(1M), ping(1M), getsockopt(2), recv(2), send(2),

gethostbyaddr(3N), gethostbyname(3N), getnetbyaddr(3N),

getnetbyname(3N), inet(3N), routing(7).

Hewlett-Packard Company - 5 - HP-UX Release 10.20: July 1996

desole si je surcharge mais bon j'en peux plus de cette route de *@!!§§§!de :roll:

Lien vers le commentaire
Partager sur d’autres sites

Si on suit la syntaxe :

/usr/sbin/route [-f] [-n] [-p pmtu] add [net|host] destination

[netmask mask] gateway [count]

route add net 192.168.139.0 netmask 255.255.255.0 192.168.140.255

ou

route add net 192.168.139.0 255.255.255.0 192.168.140.255

Question : ta route 192.168.140.255 est une adresse de broadcast ou po ?

Lien vers le commentaire
Partager sur d’autres sites

Bon alors mon adresse c'est 192.168.140.225 et non .255 donc c'est pas une adresse broadcast.

Par contre Poulpatine :transpi::roll::eeek2::non:

route add net 192.168.139.0 netmask 255.255.255.0 192.168.140.225 fonctionne.

En gros je suis pas assez feignant parce que moi je rajoutais gateway ou gw et ca hp unix 10.2, il aime pas.

:transpi:

Donc ca roule.

J ai bien mon retour de flux.

Et dire que j'avais copieusement insulte mon routeur cisco3600 :incline:

En tout cas merci à tous de votre aide, j ai moins mal a la tete maintenant.

Par contre, autre question est ce que cette route va rester en gros si la machine redemarre est ce que la route va toujours etre present ou faut il la remettre a la mano a chaque fois comme marque la: http://www.univ.edu.dj/linux/outils-tcp-ip...TCP-outils.html

Lien vers le commentaire
Partager sur d’autres sites

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

×
×
  • Créer...