A packet relay apparatus is disposed that relays packets between an inside node
and an outside IP network. A class processing unit classifies send packets to be
relayed to the IP network and allocates different virtual IP addresses thereto.
A send packet relay unit translates source addresses of the send packets to be
relayed to the IP network into virtual IP addresses on a class by class basis,
to establish classified IP communication paths. For reply packets from the IP network
passing through communication paths on a class by class basis, a reply packet relay
unit inversely translates destination virtual IP addresses into original addresses
by reference to the results of address translation effected by the send packet
relay unit.